Microsoft/monaco-editor

[Bug] CSS Property value not highlighted when colon followed with newline

Open

#3,079 建立於 2022年4月20日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)JavaScript (1,283 fork)batch import
bugcsshelp wantedlanguages-basic

倉庫指標

Star
 (14,836 star)
PR 合併指標
 (平均合併 6小時 26分鐘) (30 天內合併 15 個 PR)

描述

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Code

// The Monaco Editor can be easily created, given an
// empty container and an options literal.
// Two members of the literal are "value" and "language".
// The editor takes the full size of its container.

monaco.editor.create(document.getElementById('container'), {
	value: `<style>#abc {
grid-template-areas:
"abc"
"hi";
}</style>`,
	language: 'html'
});

Actual Behavior

Notice how the stings aren't highlighted.

Expected Behavior

The strings should be highlighted.

Additional Context

This is valid CSS and is used in CSS Grid: https://www.freecodecamp.org/learn/responsive-web-design/css-grid/place-items-in-grid-areas-using-the-grid-area-property. This problem occurs only when the colon is immediately followed by a newline.

貢獻者指南