This PR closes #546 by enabling the markdown-in-html extra to parse snippets where the markdown is on the same line as the HTML block. For example:
<p markdown="1">**text**</p>
The fix works by detecting whether the number of matched lines is less than 3 (meaning opening tag, closing tag and content aren't all on separate lines). The first line is then split after the opening tag, and the last line is split before the closing tag.
['<p markdown="1">**text**</p>'] # initial list of lines
['<p markdown="1">', '**text**</p>'] # after first line is split
['<p markdown="1">', '**text**', '</p>'] # final state
This PR closes #546 by enabling the
markdown-in-html
extra to parse snippets where the markdown is on the same line as the HTML block. For example:The fix works by detecting whether the number of matched lines is less than 3 (meaning opening tag, closing tag and content aren't all on separate lines). The first line is then split after the opening tag, and the last line is split before the closing tag.
This allows the extra to continue as normal