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

switch to a common-markdown parser #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

notslang
Copy link
Owner

closes #11

Switching to a common-markdown compliant parser, since marked doesn't really follow any standard.

This does have the issue of not showing users what the markdown they wrote will look like when passed through the most popular parsers (so people like folks from notslang/atom-tidy-markdown#11 and #7 wouldn't find out their code is broken till they render it somewhere). However, I hope that more people will switch to common-markdown so this won't be a problem. And, I really don't want to force special formatting just to support the old / broken markdown standard.

Perhaps we should have an option to warn people when their markdown might break in old parsers... or have an option to format according to the old rules?

@jtebert
Copy link

jtebert commented Aug 2, 2016

Is any work being done on this front? Am I correct that this would fix #17 and #33?

@notslang
Copy link
Owner Author

notslang commented Aug 6, 2016

It wouldn't fix the issue with lines around lists... that's a concept inherent to markdown (called "loose list items") that I've basically just ignored. It exists in the common markdown spec too.

However, you could fix the lists thing without changing the parser... you just need to track whether a given item is loose or not and maintain that state, or come up with a nice way to normalize the looseness of list items. I'm not totally clear on why people would or wouldn't use loose list items in a given place, but if you study that and figure out a good rule to apply I'd be happy to adjust the styleguide & tidy-markdown.

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

Successfully merging this pull request may close these issues.

Bug with Numbered Lists and Bulleted Lists
2 participants