Skip to content

Commit 987bba2

Browse files
committed
highlighter: Add a tiny inline markdown case for debugging
1 parent 1a053fa commit 987bba2

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
This is a **bold** comment.
2+
// ┡┛┡━━┛┗┹─ markup.bold punctuation.bracket
3+
// │ ╰─ markup.bold
4+
// ╰─ markup.bold punctuation.bracket
5+
This is a [link containing a `code` snippet].
6+
// ╿┡━━━━━━━━━━━━━━━━┛╿┡━━┛╿┡━━━━━━┛╰─ punctuation.bracket
7+
// ││ ││ │╰─ markup.link.text
8+
// ││ ││ ╰─ markup.link.text markup.raw.inline punctuation.bracket
9+
// ││ │╰─ markup.link.text markup.raw.inline
10+
// ││ ╰─ markup.link.text markup.raw.inline punctuation.bracket
11+
// │╰─ markup.link.text
12+
// ╰─ punctuation.bracket

highlighter/src/tests.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,3 +500,12 @@ fn edit_remove_and_add_injection_layer() {
500500
.update(before_text.into(), PARSE_TIMEOUT, &[edit], &loader)
501501
.unwrap();
502502
}
503+
504+
#[test]
505+
fn markdown_bold_highlight() {
506+
let loader = TestLanguageLoader::new();
507+
// This is a very simple case to check that adjacent equivalent highlights are merged
508+
// properly: the `punctuation.bracket` highlight on the consecutive `*`s should be combined
509+
// into one span.
510+
highlight_fixture(&loader, "highlighter/markdown_bold.md");
511+
}

0 commit comments

Comments
 (0)