Text::Markdown::Discount
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
796 B

. tests/functions.sh
title "pseudo-protocols"
rc=0
MARKDOWN_FLAGS=
try '[](id:) links' '[foo](id:bar)' '<p><span id="bar">foo</span></p>'
try -fnoext '[](id:) links with -fnoext' '[foo](id:bar)' '<p>[foo](id:bar)</p>'
try '[](class:) links' '[foo](class:bar)' '<p><span class="bar">foo</span></p>'
try -fnoext '[](class:) links with -fnoext' '[foo](class:bar)' '<p>[foo](class:bar)</p>'
try '[](lang:) links' '[foo](lang:en)' '<p><span lang="en">foo</span></p>'
try -fnoext '[](lang:) links with -fnoext' '[foo](lang:en)' '<p>[foo](lang:en)</p>'
try '[](raw:) links' '[foo](raw:bar)' '<p>bar</p>'
try -fnoext '[](raw:) links with -fnoext' '[foo](raw:bar)' '<p>[foo](raw:bar)</p>'
# try '[](id:) wrapping a href' '[[foo](bar)](id:baz)' '<p><span id="baz">foo</span></p>'
summary $0
exit $rc