1
Fork 0

Add test case for backslash escapes

This commit is contained in:
Jan-Erik Rediger 2021-08-02 18:18:49 +02:00
parent b23b9558ab
commit e759070dc8
3 changed files with 25 additions and 0 deletions

View 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"
\&ouml; not a character entity
1\. not a list

View 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"
\&ouml; not a character entity
1\. not a list

View file

@ -150,3 +150,10 @@ fn similar_heading_different_casing() {
fn tables_with_html() { fn tables_with_html() {
assert_toc!("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");
}