asciidoctor-vscode
asciidoctor-vscode copied to clipboard
syntax highlighting bug with unix shell code sections such as [source,bash]
unterminated if statements with shell syntax seem to break syntax highlighting in the VSCode text editor. It doesn't affect the preview though, just the text editor. It seems to affect unix shell languages: bash, sh, shell.
I don't know whether other keywords affect this too.
[source,bash]
----
if
----
Example:

Unterminated quotes also replicate the bug:
[source,bash]
----
'
----

We currently rely on TextMate grammars but it's too limiting/bug prone. Instead, we should migrate to semantic highlighting: https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide or LSP: https://code.visualstudio.com/api/language-extensions/language-server-extension-guide
If someone wants to give it a try, please feel free to do so!