1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
. tests/functions.sh
title "html comments"
rc=0
MARKDOWN_FLAGS=
try 'html comments' \
'<!--
**hi**
-->' \
'<!--
**hi**
-->'
try 'comment with trailing text' '<!-- this is -->a test' \
'<p><!-- this is -->a test</p>'
COMMENTS='<!-- 1. -->line 1
<!-- 2. -->line 2'
try 'two comments' "$COMMENTS" \
'<p><!-- 1. -->line 1</p>
<p><!-- 2. -->line 2</p>'
COMMENTS='<!-- 1. -->line 1
<!-- 2. -->line 2'
try 'two adjacent comments' "$COMMENTS" \
'<p><!-- 1. -->line 1
<!-- 2. -->line 2</p>'
try 'comment, no white space' '<!--foo-->' '<!--foo-->'
try 'comment, indented end with trailing text' \
'<!--
-->00000' \
'<p><!--
-->00000</p>'
try 'comment with leading text' 'Text text text<!--
-->' \
'<p>Text text text<!--
--></p>'
summary $0
exit $rc
|