microsoft / microsoft/monaco-editor
[Bug] Handlebars syntax highlighting broken since version 0.35.0
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
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 Link
Playground with unexpected brackets highlighing {{{ }}}
https://microsoft.github.io/monaco-editor/playground.html?source=v0.35.0#XQAAAAJ5AQAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscwzhsWG_1uhs0-3YGTBOsVJ4S4FwfCDQb5-2uUHXTVAefbVSd9IzaZ_vv9VR9KugsKicTKQ1OZgR4qMzYNG8oY_AkxFezfwWHwjDKVy3_uJ9AWb9KOwnA_ApXsDWPrV6CNfDprrH-007Gez0wm4FzXaZQQQ7y0Syg6uTw9urDuwR6z7WMtYEbZq2_Y9nbft1OLEbDqnwh8TKzjfDtcG6cBrapgfOLJ2AM045qGXGvaT6_jK4UWrD4WcDZwWEkMebOW9oCINNMYJFaITG8ntsjHU_zpJ9ooQK7LFjOlvNNin3V5UP_fQSIL
Monaco Editor Playground Code
const value = /* set from `myEditor.getModel()`: */ `
{{#blockHelper}}
{{ escaped }}
{{{ unescaped }}}
{{/blockHelper}}
`;
// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
value,
language: "handlebars",
automaticLayout: true,
});
Reproduction Steps
- Use handlebars tripple curly brackets for unescaped output
- Switch between editor version
0.34.1(as expected)0.35.0and latest stable (not as expected)
Actual (Problematic) Behavior
Expected Behavior
Additional Context
In addition to the red coloring of the tripple curly brackets, you can also notice that brackets are colored in blue in general and not black as expected.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Monaco Editor Playground reproduction and compare syntax highlighting for the same Handlebars sample in versions 0.34.1, 0.35.0, and the latest stable release. Trace the Handlebars language highlighting entry point from the playground configuration, then verify that triple curly brackets and ordinary brackets receive the expected colors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- handlebars, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100