asciidoctor / asciidoctor-vscode

AsciiDoc support for Visual Studio Code using Asciidoctor
Other
328 stars 97 forks source link

Verse delimited block syntax breaks syntax highlighting. #893

Open dgrahn opened 1 month ago

dgrahn commented 1 month ago

Problem

I'm trying to write a verse with the delimited block syntax. However, this breaks syntax highlight for all content beneath the block. Problem shown below, reproduce by copying provided AsciiDoc into a new file. It breaks without the sidebar code too.

image

Copyable AsciiDoc ```adoc = Hello **** [verse,The Agile Manifesto] ---- We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value: Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan That is, while there is value in the items on the right, we value the items on the left more. ---- **** = Hello ```

Versions

AsciiDoc: v3.3.1
Version: 1.91.1 (user setup)
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Date: 2024-07-09T22:06:49.809Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631

I didn't see any logs related to AsciiDoc.

ggrossetie commented 1 month ago

Related to https://github.com/asciidoctor/asciidoctor-vscode/issues/686 but in this case we might be able to do a fix by updating the grammar.

If you want to take a look: https://github.com/asciidoctor/asciidoctor-vscode/blob/master/syntaxes/Asciidoctor.json and more specifically:

https://github.com/asciidoctor/asciidoctor-vscode/blob/e017e77f47fbe97bb11872df2b127cce26f8d1de/syntaxes/Asciidoctor.json#L1712-L1805