SubEthaEdit icon indicating copy to clipboard operation
SubEthaEdit copied to clipboard

Markdown mode: The new syntax integration for languages can mess up basic markdown highlighting

Open monkeydom opened this issue 6 years ago • 1 comments

E.g. this:

colorfail.md.txt

image

Generally speaking, embedded syntaxes that leave states open can bleed back into Markdown. While it would probably be worth investigating a fix on the mode level, where you could specify such an embed style that would hard end styling stacks, there is no such thing at the moment. So what has do be done to allow for incomplete code snippets (which I would argue we need to) is to add the three backticks state end to all top level states. You can see how that is done in the other embedding modes e.g. eex, erb, php. It looks quite ugly, and sometimes needs to match whitespace in front of the ``` so multiple states can end if openend. But at least one or two levels should be supported as I would argue markdown code snippets that open up classes, functions, etc. but don't close them should be highlighted correctly.

monkeydom avatar Aug 10 '19 06:08 monkeydom

Regression introduced in 5.1

monkeydom avatar Sep 18 '19 09:09 monkeydom