Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for numeric lists #7

Closed
Glavin001 opened this issue Apr 30, 2015 · 3 comments
Closed

Support for numeric lists #7

Glavin001 opened this issue Apr 30, 2015 · 3 comments

Comments

@Glavin001
Copy link

Input

- item
-  item
-   item

1. one
2.  two
2.   three

Preview

  • item
  • item
  • item
  1. one
  2. two
  3. three

Expected Output

- item
- item
- item

1. one
2. two
2. three

Current (wrong) Output

- item
- item
- item
- one
- two
- three

Notice how it removes the list item's numbering (1,2,3.).

/cc Glavin001/atom-beautify#292

@notslang
Copy link
Owner

hmm... that's pretty weird, but I'm not sure if it's tidy-markdown. it might be marked, or an edge case with the markdown language.

a quick test with atom's markdown preview shows this:

screenshot from 2015-04-30 11 57 11

and the same issue appears with this input:

- item
- item
- item

1. one
2. two
3. three

@Glavin001
Copy link
Author

Yup! Right on. See this issue for Marked: markedjs/marked#55

Basically, it treats it as a single list, since there is no header or any text separating the two lists.
So by adding a heading or text, it works!

Input

#            heading 1

- item
-  item
-   item

##     heading 2

1. one
2.  two
2.   three

Output

This works!

# heading 1
- item
- item
- item

## heading 2
1. one
2. two
3. three

Gorgeous.

@notslang
Copy link
Owner

notslang commented May 3, 2015

thanks for finding that - I think I'm going to enable smart-lists and/or switch to a common-markdown compliant parser, since marked doesn't really follow any standard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants