. tests/functions.sh title "html blocks" rc=0 MARKDOWN_FLAGS= try 'self-closing block tags (hr)' \ '
text
' try 'self-closing block tags (hr/)' \ 'text
' try 'html comments' \ '' \ '' try 'no smartypants inside tags (#1)' \ '' \ '' try 'no smartypants inside tags (#2)' \ '' \ '' try -fnohtml 'block html with -fnohtml' 'hi!' '<b>hi!</b>
' try -fnohtml 'malformed tag injection' '<x <script>
' try -fhtml 'allow html with -fhtml' 'hi!' 'hi!
' # check that nested raw html blocks terminate properly. # BLOCK1SRC='Markdown works fine *here*. *And* here.Markdown works fine here.
And here.
Markdown here is not parsed by RDiscount.
Nor in this paragraph, and there are no paragraph breaks.
' try 'nested html blocks (1)' "$BLOCK1SRC" "$BLOCK1OUT" try 'nested html blocks (2)' \ 'a test
' try 'block with trailing text' 'this is
a test' \ 'this is
a test
' COMMENTS='line 1 line 2' try 'two comments' "$COMMENTS" \ 'line 1
line 2
' COMMENTS='line 1 line 2' try 'two adjacent comments' "$COMMENTS" \ 'line 1
line 2
' try 'comment, no white space' '' '' try 'unclosed block' 'here we go!' '
here we go!
' summary $0 exit $rc