monaco-editor
monaco-editor copied to clipboard
[Bug] Monarch Tokenizer negative "lookbehind, lookahead" not working
Reproducible in vscode.dev or in VS Code Desktop?
- [X] Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- [ ] Not reproducible in the monaco editor playground
Monaco Editor Playground Code
return {
tokenizer: {
root: [
[/\b(?<=var)\s\w+/, 'keyword']
]
},
};
Actual Behavior
lookahead not woring
Expected Behavior
Additional Context
highlight words that doesnt start with var + whitespace
the same problem
I guess this depends on browser support of lookbehind which is not perfect https://caniuse.com/js-regexp-lookbehind