Open
Description
openedon Feb 11, 2022
Reproducible in vscode.dev or in VS Code Desktop?
- 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
monaco.editor.create(document.getElementById('container'), {
value: `<script type="module">\n\tconsole.log("hello");\n</script>`,
language: 'html'
});
Actual Behavior
The contents of the script tag are marked as language vs.editor.nullLanguage
, precluding highlighting and, upon editing or merely moving the cursor within the tag, causing various callbacks for editor features to throw Unexpected languageId
when calling LanguageConfigurationRegistry.getLanguageConfiguration
.
Expected Behavior
Inline code is recognized as JavaScript, is syntax highlighted, and editing/navigation does not raise exceptions.
Additional Context
This began causing exceptions in version 0.32.0, with 0.31.1 and prior nothing is raised but the inline code is still similarly marked as vs.editor.nullMode
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment