use mini_markdown::render; #[test] fn commonmark_test_12_backslash_escapes() { let test_html = render("\\!\\\"\\#\\$\\%\\&\\\'\\(\\)\\*\\+\\,\\-\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\\\\\]\\^\\_\\`\\{\\|\\}\\~\n"); let reference_html = "

!"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~

\n"; assert_eq!(test_html, reference_html); } #[test] fn commonmark_test_13_backslash_escapes() { let test_html = render("\\\t\\A\\a\\ \\3\\φ\\«\n"); let reference_html = "

\\\t\\A\\a\\ \\3\\φ\\«

\n"; assert_eq!(test_html, reference_html); } #[test] fn commonmark_test_14_backslash_escapes() { let test_html = render("\\*not emphasized*\n\\
not a tag\n\\[not a link](/foo)\n\\`not code`\n1\\. not a list\n\\* not a list\n\\# not a heading\n\\[foo]: /url \"not a reference\"\n\\ö not a character entity\n"); let reference_html = "

*not emphasized*\n<br/> not a tag\n[not a link](/foo)\n`not code`\n1. not a list\n* not a list\n# not a heading\n[foo]: /url "not a reference"\n&ouml; not a character entity

\n"; assert_eq!(test_html, reference_html); } #[test] fn commonmark_test_15_backslash_escapes() { let test_html = render("\\\\*emphasis*\n"); let reference_html = "

\\emphasis

\n"; assert_eq!(test_html, reference_html); } #[test] fn commonmark_test_16_backslash_escapes() { let test_html = render("foo\\\nbar\n"); let reference_html = "

foo
\nbar

\n"; assert_eq!(test_html, reference_html); } #[test] fn commonmark_test_17_backslash_escapes() { let test_html = render("`` \\[\\` ``\n"); let reference_html = "

\\[\\`

\n"; assert_eq!(test_html, reference_html); } #[test] fn commonmark_test_18_backslash_escapes() { let test_html = render(" \\[\\]\n"); let reference_html = "
\\[\\]\n
\n"; assert_eq!(test_html, reference_html); } #[test] fn commonmark_test_19_backslash_escapes() { let test_html = render("~~~\n\\[\\]\n~~~\n"); let reference_html = "
\\[\\]\n
\n"; assert_eq!(test_html, reference_html); } #[test] fn commonmark_test_20_backslash_escapes() { let test_html = render("\n"); let reference_html = "

http://example.com?find=\\*

\n"; assert_eq!(test_html, reference_html); } #[test] fn commonmark_test_21_backslash_escapes() { let test_html = render("\n"); let reference_html = "\n"; assert_eq!(test_html, reference_html); } #[test] fn commonmark_test_22_backslash_escapes() { let test_html = render("[foo](/bar\\* \"ti\\*tle\")\n"); let reference_html = "

foo

\n"; assert_eq!(test_html, reference_html); } #[test] fn commonmark_test_23_backslash_escapes() { let test_html = render("[foo]\n\n[foo]: /bar\\* \"ti\\*tle\"\n"); let reference_html = "

foo

\n"; assert_eq!(test_html, reference_html); } #[test] fn commonmark_test_24_backslash_escapes() { let test_html = render("``` foo\\+bar\nfoo\n```\n"); let reference_html = "
foo\n
\n"; assert_eq!(test_html, reference_html); }