Microsoft/monaco-editor

Wrong YAML syntax highlighting

Open

#2.681 geöffnet am 4. Okt. 2021

Auf GitHub ansehen
 (1 Kommentar) (1 Reaktion) (0 zugewiesene Personen)JavaScript (1.283 Forks)batch import
buggrammarshelp wanted

Repository-Metriken

Stars
 (14.836 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6h 26m) (15 gemergte PRs in 30 T)

Beschreibung

There seem to be some wrong syntax highlighting when for example entering foo: "{bar: 7}". Monaco highlights {bar the same way as foo. It should better respect that it is part of a string value. Just tested the same with VS Code and it doesn't have this problem.

monaco-editor version: 0.28.0 Browser: tested in Chrome OS: Windows 10 Playground code that reproduces the issue:

monaco.editor.create(document.getElementById("container"), {
    value: 'foo: "{bar: 7}"\n',
    language: 'yaml'
});

Contributor Guide