markdown: codehilite produces invalid html when used within a list
When using codeblocks within a list, the list item (if it contains other text as well before the codeblock) is wrapped in a <p></p>
element. Within that, when the codeblock comes, codehilite puts a <div class="codehilite"><pre><code># Code goes here ... </code></pre></div>
in there.
This is invalid html: https://stackoverflow.com/questions/10763780/putting-div-inside-p-is-adding-an-extra-p
Why not just add the class to the <pre>
element: <pre class="codehilite"><code># Code goes here ... </code></pre>
? This would solve the issue I think.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (2 by maintainers)
I’ve closed this issue as it is downstream.