Files
david parsons 058820ed9d Redo comment block handling; standard markdown only treats comments as
block html if the start comment marker starts at the beginning of a line
and the end comment marker is at the end of a line.
2016-02-13 09:39:26 -08:00

50 lines
781 B
Raku

. 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