Microsoft/monaco-editor

Syntax Highlighting isn't working for the first item inside a Media Query

Open

#2,527 创建于 2021年6月14日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)JavaScript (1,283 fork)batch import
buggrammarshelp wanted

仓库指标

Star
 (14,836 star)
PR 合并指标
 (平均合并 6小时 26分钟) (30 天内合并 15 个 PR)

描述

monaco-editor version: 0.25.0 Browser: Chrome 91.0.4472.77 (but appearing in all browsers tested in) OS: MacOS 11.4 Playground code that reproduces the issue:

@media (max-width: 300px) {
    p.test {

    }

    p.test {
        
    }
}

You'll see that the first p.test selector does not have syntax highlighting, where the second does.

Note that this isn't reproducible in VS Code directly, nor in VS Code web. It is however visible on the Monaco Editor homepage if you change the language to CSS and scroll down to line 629.

贡献者指南