Open aryzing opened 6 years ago
This is problematic. The Markdown grammar should end the JS parsing when it finds a ``` but because of the way TextMate grammars work it will only see the `` at the topmost
rule stackof the called grammar. In my case when a
const,
letor
varis detected I call a new
rule stackwhich isn't terminated until an end or new statement is detected ( a semi-colon, EOF or JS keyword - if, else etc) so markdown isn't processing the \
``.
I could put a check in for a line containing only ``` and terminate the rule stack
but ``` is actualy valid JS so I'm a bit loathe to do so.
You could just put a ; at the end of the statement or on a new line and it will work. For normal code that doesn't end on a var definition of this type it should work without semi-colons. Not ideal if you don't like semi's!
When writing jsx codeblocks in markdown files, I believe that the syntax highlighting is provided by
language-babel
. However, when trying to close the codeblock, the syntax highlighting for jsx bleeds outside the closing```
.