Closed ickc closed 7 years ago
Thanks for submitting this -- I am looking into a few things related to recent changes in the MMD parser. Trying to balance accuracy with performance.
Actually, the first line has always been parsed as Markdown in older versions of MMD. It has to do with whether the html in question is a block element in terms of Markdown (e.g. a paragraph on its own), or part of a Markdown paragraph. When you add the " test" to the end, the <div>
becomes part of a paragraph and is handled differently.
I'm working on a new parser, so this will be handled differently at some point in the future. But I did want to point out that this is not a new development.
MMD v 6 is now in alpha. I won't be spending much time updating MMD 5 any more, as I my development time should be spent finishing (and then polishing) MMD 6.
MMD 6 will handle HTML blocks in a different way, however. It is based roughly on the way CommonMark handles HTML. In short, by adding or removing whitespace between the HTML wrapping tag and the contents, you can change whether MultiMarkdown syntax is processed inside the tag.
In my own test file, I have something like this: (modified from the documentation)
In the previous versions of MMD, the first line is not in Markdown (as the documentation suggest). But in the latest version of MMD (5.2.0), somehow if there are some texts after the
div
, MMD will render the text within thediv
as Markdown.