-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Bug] Code block splitted (1.7.4, 2.0.0 Beta 1) #836
Comments
Thanks for reporting this! This one in particular is a known issue, and has the same root cause as your other issue: when parsing a list continuation, we should first check to see if the line can start a new block, and if so, allow that to interrupt the list (provided that the indentation is not sufficient to contain the block in the list). Worth noting that we can't support all of CommonMark's precedence rules (particularly for inlines) with Parsedown's parsing technique, and that Parsedown's parsing method is going to need to be special cased a little to deal with this. I think that on balance it is probably worth doing for resolving this ambiguity in block precedence, and so I'll aim to fix this in the v2 branch. |
See #707 for the more general issue. I'd originally closed this as a won't fix, but I have reconsidered and think that this can be implemented without introducing an unreasonable amount of complexity. |
Description
Parsedown splits a code block in multiple parts when having a markdown file like the following:
The issue is present in the latest stable release and the latest public beta.
Expected Behavior
Actual Behavior
Steps to reproduce
Reproduce with Parsedown 1.7.4
Reproduce with Parsedown 2.0.0 Beta 1
Setup
demo.php
The text was updated successfully, but these errors were encountered: