erusev / parsedown

Better Markdown Parser in PHP
https://parsedown.org
MIT License
14.74k stars 1.12k forks source link

Block precedence rules #707

Open aidantwoods opened 5 years ago

aidantwoods commented 5 years ago

Issue to track whether we want Parsedown to be able to tell when it should continue a block or start a new one based on precedence. This is a separate issue to that of inline precedence rules, and should have less of a performance overhead—the main tricky part is making this work with unknown blocks (if custom blocks are inserted by the user). Probably we should make precedence rules a user decision so that blocks do not need to know of each-other's existence.

Relevant issues (that I am closing in favour of this one so we can track the underlying issue directly): https://github.com/erusev/parsedown/issues/649#issuecomment-405974216 https://github.com/erusev/parsedown/issues/656 https://github.com/erusev/parsedown/issues/466

aidantwoods commented 2 years ago

I'm not going to add this in 2.0, it can be done but requires a new parsing strategy (which is at odds with Parsedown's focus on speed/simplicity).