Add test case for backslash escapes
This commit is contained in:
parent
b23b9558ab
commit
e759070dc8
9
tests/backslash_escapes.in.md
Normal file
9
tests/backslash_escapes.in.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
\*not emphasized*
|
||||
\<br/> not a tag
|
||||
\[not a link](/foo)
|
||||
\`not code`
|
||||
\* not a list
|
||||
\# not a heading
|
||||
\[foo]: /url "not a reference"
|
||||
\ö not a character entity
|
||||
1\. not a list
|
9
tests/backslash_escapes.out.md
Normal file
9
tests/backslash_escapes.out.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
\*not emphasized\*
|
||||
\<br/> not a tag
|
||||
\[not a link\](/foo)
|
||||
\`not code\`
|
||||
\* not a list
|
||||
\# not a heading
|
||||
\[foo\]: /url "not a reference"
|
||||
\ö not a character entity
|
||||
1\. not a list
|
|
@ -150,3 +150,10 @@ fn similar_heading_different_casing() {
|
|||
fn tables_with_html() {
|
||||
assert_toc!("tables_with_html");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn backslash_escapes() {
|
||||
// Regression test #21
|
||||
// Backslash-escaped elements should still be escaped.
|
||||
assert_toc!("backslash_escapes");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue