[Kramdown-users] More HTML corruption

Thomas Leitner t_leitner at gmx.at
Fri Dec 4 02:21:59 EST 2009

> There is still some HTML corruption even with the latest commit 
> (89fc586b5f70ccfc8facfae48aa0a0ce31df1d73). With input:
>    <dl>
>    <dt>Moo</dt>
>    <dd>
>    Bar</dd>
>    </dl>
>    Cow
>    ---

kramdown seems to corrupt HTML in this case but it is actually only
following its rules because it can only recognize block HTML tags at
*the start of a line*!

So if you change the above to


kramdown will give you the correct output. Refer to the syntax
documentation for this case (i.e. a HTML block is only started when a
line is started with a non-span HTML tag).

However, when I think about it this behaviour could be changed when
parsing raw HTML, i.e. when parsing the content of an HTML block as
span or block level elements this behaviour can't be avoided. However,
when parsing as raw HTML kramdown could just parse every line till the
end and not just HTML block lines... With this changes your original
example would work.

So, would this be useful? It would certainly slow down the HTML

-- Thomas

More information about the Kramdown-users mailing list