. tests/functions.sh title "html blocks" rc=0 MARKDOWN_FLAGS= try 'self-closing block tags (hr)' \ '
text' \ '

text

' try 'self-closing block tags (hr/)' \ '
text' \ '

text

' 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 here is *not* parsed by RDiscount. Nor in *this* paragraph, and there are no paragraph breaks.' BLOCK1OUT='

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)' \ '
This is inside a html block
This is, too
and so is this
' \ '
This is inside a html block
This is, too
and so is this
' try 'unfinished tags' '<foo bar

' try 'block with trailing text' '

this is

a test' \ '

this is

a test

' try 'unclosed block' '

here we go!' '

here we go!

' try '
block' ' pie?
' '
pie?
' try 'code inside a blockquote' \ '>
stuff
' \ '
stuff
' try 'multi-line html with trailing text' \ '

test test test test test test

+' \ '

test test test test test test

+

' summary $0 exit $rc