-
Notifications
You must be signed in to change notification settings - Fork 158
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 parser doesn't recognize CodeBlock inside QuotedBlock #342
Comments
It's even worse that that! If the QuotedBlock contains any InlineCode after the CodeBlock, then it parses wrong -- e.g.
Here it renders |
It also fails to parse an indented code block inside a quoted block, for example
What I expect here is a CodeBlock inside the QuotedBlock. But instead it rolls the indented code block just into the same single Literal that contains the rest of the stuff. |
Any PR which brings us closer to the spec (http://spec.commonmark.org/0.22/) is very welcome. Adding unit tests is a big plus :) |
I think that our handling of indented code blocks is correct. You are always required to have a blank line around the code. The CommonMark demo requires this too: here is a live demo. However, we are not handling the fenced code blocks correctly. We require newlines there too. The following works:
... and CommonMark does not require the newlines. So, if we can fix that, that would be nice. In the meantime, adding a newline should be a reasonable workaround... |
Do not require newline before fenced code block (fix #342)
I'm a big fan of fast releases and my PR will take a while to become green :) |
Look at this piece of markdown, and how it renders, and then how it parses in FSharp.Markdown:
But FSharp.Markdown parses the quoted block like this:
- Strong
- Literal "This is an annotation”
- InlineCode "`vb\nModule Module1\nEnd Module"
It should parse it as a CodeBlock, but it's actually parsing it as an InlineCode.
The text was updated successfully, but these errors were encountered: