Microsoft/monaco-editor

Rust syntax highlighting broken for raw strings

Open

#2897 aperta il 17 gen 2022

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)JavaScript (1283 fork)batch import
buggrammarshelp wanted

Metriche repository

Star
 (14.836 star)
Metriche merge PR
 (Merge medio 6h 26m) (15 PR mergiate in 30 g)

Descrizione

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

Guida contributor