Open dmitriypereverza opened 1 year ago
Confirm. Issue exists. Need that fix too.
I need this too. I'm working with an embedded language where the escape sequence to exit the embedded language happens inside the embedded language. Right now my highlighting can't work correctly because I need to highlight the escape sequence as part of the embedded language, not as part of the container language.
I created a local playground here https://microsoft.github.io/monaco-editor/monarch.html with the following:
And in console
Uncaught Error: monarch-language-mylang: no rule containing nextEmbedded: "@pop" in tokenizer embedded state: script.
But if i add rule
[/```/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
in script error is gone.Seems like monarch don't check nextEmbedded: '@pop' in action cases.
PR: #172193