Microsoft/monaco-editor

Wrong YAML syntax highlighting

Open

#2,681 opened on 2021年10月4日

GitHub で見る
 (1 comment) (1 reaction) (0 assignees)JavaScript (1,283 forks)batch import
buggrammarshelp wanted

Repository metrics

Stars
 (14,836 stars)
PR merge metrics
 (平均マージ 6h 26m) (30d で 15 merged PRs)

説明

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'
});

コントリビューターガイド