Microsoft/monaco-editor

Rust syntax highlighting broken for raw strings

Open

#2,897 创建于 2022年1月17日

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

仓库指标

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

描述

Seems like this is still a problem for code such as:

fn main() {
    let a = r#"hello" world"#;
    println!("{}", a);
}

Using the #ed raw strings. Now that the rust-playground may also use monaco one may encounter this problem:

image

Note: rust's raw strings are formed as an r, then some number of #s, "<the string here>", then a matching number of #s

Originally posted by @Ben-Lichtman in https://github.com/microsoft/monaco-editor/issues/2552#issuecomment-1013553336

贡献者指南