You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@depryf, there is no way to do it in pegdown and no easy way without risking breaking a lot of parser rules.
The difficulty in maintaining and modifying pegdown parser was one of the reasons I rewrote commonmark-java to replace pegdown in my Markdown Navigator plugin for IntelliJ IDEs: https://github.com/vsch/idea-multimarkdown. The parser project is https://github.com/vsch/flexmark-java has very detailed source based AST with source offset for every part of the element. I need that for syntax highlighting and other plugin source reliant features.
It is CommonMark 0.27 (GitHub Comments) compliant but In the last release I added list parsing options to emulate list indentation rules used by: markdown.pl, MultiMarkdown (like pegdown 4 space indents) and kramdown (GitHub Docs). The only extensions that pegdown has that I did not yet implement are: typographic quotes, smarts and definition lists. The rest of the extensions are available, with some extra ones that pegdown does not have.
As an added bonus and what motivated me to switch the parsing is 30-50x faster than pegdown on average documents and several thousand times faster on pegdown's pathological input like [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[.
The AST offsets are bug free and regular. It is also fully modifiable unlike pegdown's with next, prev and parent links.
Maybe there is already a way to do this, but I didn't find it in the current extensions.
The regular markdown (not GitHub flavored) requires an empty line between a sentence and the start of a list:
The following in regular markdown (and in pegdown) doesn't render the list items in a list:
In GitHub it does.
Is there currently a way to achieve the same behavior as in GitHub?
The text was updated successfully, but these errors were encountered: