-
Notifications
You must be signed in to change notification settings - Fork 22
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
Markdown lexer: two blockcode errors #93
Comments
Thanks for the report. I'll look into this when I have some time. |
I've implemented As for the second issue you pointed out, there are two problems:
I spent some time investigating and trying things out, but I cannot figure out how to solve this. Markdown is very weird. It's possible another lexer rewrite will be needed to correct this, but I honestly don't know how I'd approach that. I'm afraid I'll have to leave this unresolved for now :( A workaround for your case is to wrap it all in a fenced code block (backticks or tildes). I don't have a workaround for the second case I brought up. |
FWIW, there is Lua Markdown parser implementation from John McFarlane of Pandoc/Commonmark. https://github.com/jgm/lunamark/blob/master/lunamark/reader/markdown.lua |
Fenced blockcode with tilde (commonmark spec) it's not supported
Fixed this (I'm not a programmer and i don't know how to PR), adding this line after
local code block =
And then changed this line to include tilde block type:
Blockcode (line, not fenced) error (edge case with lists inside)
Markdown example (indent using Tabs or 4 spaces to get blockcode line):
But I get blockcode only first & last line, I think the other lines are recognized as list.
I've tried 2 fix this, but it's tied with lists and fixing one damage the other.
Tested expected behavior with Github and:
The text was updated successfully, but these errors were encountered: