Always use square brackets in marked_text_ranges

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-03-28 17:11:35 +02:00
parent bbfb63ff89
commit 45ecd8e0a6
2 changed files with 13 additions and 20 deletions

View file

@ -1081,10 +1081,7 @@ pub mod tests {
);
language.set_theme(&theme);
let (text, highlighted_ranges) = marked_text_ranges(
r#"const{} <a>: B = "c [d]""#,
vec![('{', '}'), ('<', '>'), ('[', ']')],
);
let (text, highlighted_ranges) = marked_text_ranges(r#"const[] [a]: B = "c [d]""#);
let buffer = cx.add_model(|cx| Buffer::new(0, text, cx).with_language(language, cx));
buffer.condition(&cx, |buf, _| !buf.is_parsing()).await;