In pull request #80 the implicit wrapping element for html and md tagged template literals was changed from a DIV to a SPAN.
Perhaps for md the old implicit wrapping, using a DIV, is more sensible. At the moment if you apply md to a string with no formatting or only inline formatting, it assumes that the string is a paragraph, so you get back a P, that is a block level element. If you apply it to a string containing only one Markdown "block" (e.g. "# foo bar" or "> foo bar") you get back the corresponding HTML block element (e.g. H1 or BLOCKQUOTE). But when you pass a string containing more than one Markdown block, you get back a SPAN (inline element) wrapping corresponding HTML block elements. In my humble opinion this behavior is not what users would expect.
With html it makes sense to avoid the implicit SPAN by wrapping all content in an explicit DIV. This also works with md, but doing so you'll loose all Markdown block level formatting.
In pull request #80 the implicit wrapping element for
html
andmd
tagged template literals was changed from a DIV to a SPAN.Perhaps for
md
the old implicit wrapping, using a DIV, is more sensible. At the moment if you applymd
to a string with no formatting or only inline formatting, it assumes that the string is a paragraph, so you get back a P, that is a block level element. If you apply it to a string containing only one Markdown "block" (e.g."# foo bar"
or"> foo bar"
) you get back the corresponding HTML block element (e.g. H1 or BLOCKQUOTE). But when you pass a string containing more than one Markdown block, you get back a SPAN (inline element) wrapping corresponding HTML block elements. In my humble opinion this behavior is not what users would expect.With
html
it makes sense to avoid the implicit SPAN by wrapping all content in an explicit DIV. This also works withmd
, but doing so you'll loose all Markdown block level formatting.Keep up the good work.