Syntax highlighting spills out of source block
Description
After updating to VSCode 1.45.1 and the AsciiDoc extension 2.7.15, and Haskell Syntax Highlighting 3.2.1, syntax highlighting no longer works.
System Information
Version: 1.45.1 Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a Date: 2020-05-14T08:33:47.663Z Electron: 7.2.4 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Darwin x64 19.2.0
To Reproduce
Steps to reproduce the issue:
- Create a file named
test.asc - Add the following text:
[source,haskell]
----
data Maybe a = Nothing | Just a
----
The first word is highlighted.
-
You should notice that the trailing
----doesn't get interpreted as the end of the source block. Instead it's interpreted as a COMMENT in Haskell, which starts with--. -
You should see that the trailing
----shows the syntax highlighting of a Haskell comment, which in my screenshot is grey. -
The first word of the following sentence is highlighted telling as an Uppercase Variable in Haskell.
-
Next, add a NON-BLANK line after the
data, i.e. anything AFTER the line withdatain it EXCEPT for a COMMENT, i.e. a line that starts with--, and you'll see that it works properly. If the line after the line withdatais a COMMENT line, it will still be broken. -
Next, delete the added line and change
datatodataxand the problem also goes away.
Seems like the word data is the problem here when there is no other non-comment line.
Screenshots & Files

Additional Context
Turns out that going back to an older version of the extension doesn't fix the problem.
I found another case:
[source,haskell]
----
compareMaybe :: ∀ a. Maybe a -> Maybe a -> Boolean
----
This will spill out unless I remove the :: or add a NON-COMMENT line AFTER the line with compareMaybe.
Turns out that downgrading to Haskell Syntax Highlighting 3.0.3 works, yet there are ZERO problems with syntax highlighting in Haskell files, just ASC files.
Something similar as far as i can tell

Probably related to: https://github.com/asciidoctor/asciidoctor-vscode/issues/403
Similar issue with TypeScript, when a type isn't followed by a ;:
Before
```ts
type Incomplete = number
```
After
