Open BobChao87 opened 7 years ago
Thanks. I've noticed that bug myself but haven't tried to fix it. Honestly I've never touched the syntax code itself. I just copied it from the TextMate bundle and published it to the VS Marketplace.
Seems like an easy fix in regex terms, but TM grammars are strange things.
Feel free to submit a PR if you want to try to fix it. I think it may have involve adding some boundary-type regex code around the '''
and ''
begin/end markers.
Nesting bold and italics inside of each other produces unexpected results and causes faulty syntax highlighting.
As an example:
This ends up being rendered as
Interestingly, the initial bold/italics tick marks seem to be ordered randomly. Sometimes two italics first, sometimes three bold first.
While I understand if for technical reasons you cannot both italics and bold the font (i.e. "Note" and "restore bold,"), it would be nice if the extension correctly started and terminated portions of the string that should be rendered in italics only and are not being bolded in the final product.
Notably, switching the markers produces correct markup as least so far as applying the correct single styling to portions that are only single-styled. Obviously it's still off for double-styled portions as that case doesn't seem to be handled.
After this bug occurs, text apparently becomes permanently italics as the parser likely thinks the trailing '' is an opening marker, not a closing one.