Skip to content

Commit 43378a6

Browse files
committed
Ignore inline-html
1 parent d685ca1 commit 43378a6

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

parser/src/ignore_block.rs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ impl IgnoreBlocks {
3333
}
3434
}
3535
}
36+
} else if let Event::InlineHtml(_) = event {
37+
ignore.push(range);
3638
} else if let Event::Code(_) = event {
3739
ignore.push(range);
3840
}
@@ -92,15 +94,27 @@ fn cbs_1() {
9294
fn cbs_2() {
9395
assert_eq!(
9496
bodies("`hey you` <b>me too</b>"),
95-
[Ignore::Yes("`hey you`"), Ignore::No(" <b>me too</b>")]
97+
[
98+
Ignore::Yes("`hey you`"),
99+
Ignore::No(" "),
100+
Ignore::Yes("<b>"),
101+
Ignore::No("me too"),
102+
Ignore::Yes("</b>")
103+
]
96104
);
97105
}
98106

99107
#[test]
100108
fn cbs_3() {
101109
assert_eq!(
102110
bodies(r"`hey you\` <b>`me too</b>"),
103-
[Ignore::Yes(r"`hey you\`"), Ignore::No(" <b>`me too</b>")]
111+
[
112+
Ignore::Yes("`hey you\\`"),
113+
Ignore::No(" "),
114+
Ignore::Yes("<b>"),
115+
Ignore::No("`me too"),
116+
Ignore::Yes("</b>")
117+
]
104118
);
105119
}
106120

0 commit comments

Comments
 (0)