discount/tests/backslash.t
2025-12-13 00:40:57 +04:00

22 lines
514 B
Raku

. tests/functions.sh
title "backslash escapes"
rc=0
MARKDOWN_FLAGS=
try 'backslashes in []()' '[foo](http://\this\is\.a\test\(here\))' \
'<p><a href="http://\this\is.a\test(here)">foo</a></p>'
try -fautolink 'autolink url with trailing \' \
'http://a.com/\' \
'<p><a href="http://a.com/\">http://a.com/\</a></p>'
try 'backslashes before <text' '\<code>' '<p>\<code></p>'
try 'backslashes before <{EOF}' '\<' '<p>&lt;</p>'
try 'backslashes before <[space]' '\< j' '<p>&lt; j</p>'
summary $0
exit $rc