Closed BertrandSim closed 3 years ago
Does this mess with highlighting Markdown inside HTML wrapper tags? It's not uncommon for Markdown documents to do things like wrap whole sections in some HTML tag. The syntax highlighting should catch the start and end tags as HTML but everything in between as more Markdown. I suspect this patch will break that usage, no?
By wrapper tags, are you referring to something like this?
<section>
## title of section
The following is a list
* item one
* item two
</section>
The highlighting for the above still works as intended. (ie, HTML for <section>
, markdown highlighting for the text in between, and HTML highlighting for </section>
)
Yes that's the sort of thing I was thinking about.
Yes, this patch does not break that. Here are some screenshots to illustrate :)
The syntax highlighting captures the opening and closing <section ...>
and </section>
parts separately.
As far as I know HTML tags spanning multiple lines are valid. For example,
is valid HTML. Currently, only single line HTML tags are highlighted, while multiline tags are not. This PR highlights embedded multiline tags.