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
Invalid nested list rendering #99
Comments
You must use at least 4 spaces for each level of nested list indentation. |
Closing as invalid |
Sounds good. As a side note, Github interprets a single space as indentation, but I'm assuming that in this case you're following the Daring Fireball example instead? Is this specified formally anywhere? Just curious where & how choices between Markdown/Github-Flavored Markdown/etc are made. |
Any particular reason not to support < 4 spaces for indentation? |
My point was that it seems that Pegdown could render valid documents as per the original Markdown spec, but also support a varying number of spaces without losing conformity. |
I agree with @michaelmior. I think Github markdown spec is more frequently used as !default markdown. |
The original Markdown “spec” from John Gruber is very ambiguous and incomplete, almost unusable for implementing a Markdown parser. The best Markdown spec we have is CommonMark. It’s not just another Markdown dialect, but really a standardized Markdown. They’ve done hard work with finding the most common behaviours among dozens of existing Markdown parsers and describing it in comprehensive specification. |
Yeah, I think CommonMark compatibility seems like a good goal. Although I am still somewhat skeptical. |
I'd hesitate to consign their efforts to XCKD ignominy; after I gave the CommonMark spec a read, I'm convinced that their output is high quality. In my opinion they've done a great job of massaging MD's original intent and the fractal insanity of incompatibility pretty well. YMMV. Which part of the fractal pegdown wants to represent is left as an exercise for the maintainer; the main reason I opened this ticket was an inability to get a repository's readme to simultaneously render on stash + github. I would support any movement towards CommonMark, as vendor lock-in is rarely a desirable result. |
In a nested mixed-type list, numbered lists do not render correctly, and indentation is missing.
Screenshot of the problem (expected vs actual):
The example input:
Results in the following output:
Compare with expected output (using Github as an example):
In both HTML cases I changed whitespace indentation to be consistent for comparison.
Note that changing the input's sub-list indentation from spaces to tabs works.
Originally reported as a bug in Atlassian Stash: https://jira.atlassian.com/browse/STASH-3702
The text was updated successfully, but these errors were encountered: