-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
GFM and CommonMark compatibility #4
Comments
@GULPF Thanks for the proposal. I've added the GFM implementation as the top priority as stated in README.md. In the next few days, I'll try to let the codebase pass the GFM test cases. <3 |
The corresponding work is in |
As of now (v0.7.1), nim-markdown has passed all 649 cases defined in commonmark v0.29 spec. Certain GFM extensions have been implemented, such as HTML table, strikethrough. I'll polish the code and work on the other GFM extensions in the next few weeks, such as task list items, disallowed raw HTML, etc. You can now get a commonmark-compatible markdown parser by calling: let html = markdown(md)
# or
let html = markdown(md, config=initCommonmarkConfig()) or, get a partially-implemented gfm parser by calling: let html = markdown(md, config=initGfmConfig()) |
The roadmap mentions correctness, but doesn't further explain what that means. There is no consensus on what correct handling of markdown is, see for example Babelmark which compares the output of 20 different markdown implementations. Here's just one example where the issue becomes obvious.
Have you considered making this an implementation of the GFM spec? GFM is an extension of the CommonMark spec made by GitHub, which includes support for tables and several other non-standard markdown features. By making it possible to enable/disable the extensions in the API, it would also be an implementation of CommonMark itself.
The text was updated successfully, but these errors were encountered: