asciidoctor-vscode icon indicating copy to clipboard operation
asciidoctor-vscode copied to clipboard

syntax highlighter of source code block fails when using options

Open prudhomm opened this issue 2 years ago • 1 comments
trafficstars

consider this code

[source,cpp]
----
#include <iostream> // <1>

int main() { // <2>
    std::cout << "Hello, world" << std::endl; // <3>
    return 0; // <4>
}
----

this is highlighted properly as follows in vscode: Screenshot 2023-09-24 at 16 04 51

However if I do something like that, the highlighter does not recognize that we are in c++ anymore Screenshot 2023-09-24 at 16 05 25

prudhomm avatar Sep 24 '23 14:09 prudhomm

As mentioned in #686, we currently rely on a TextMate grammar but it cannot properly parse AsciiDoc.

ggrossetie avatar Sep 25 '23 19:09 ggrossetie