I'm trying to wrap a div around some Markdown and its HTML rendering with CSS, but the opening tag gets wrapped in a p, making it ineffective. Here is a small test case without any Markdown:
(with-output-to-string (out)
(3bmd::print-doc-to-stream-using-format
(3bmd-grammar:parse-doc (format nil "<div>~%~%</div>"))
out :html))
=> "<p><div></p>
</div>
"
I'd expect the output to be <div></div> with two newlines in between them.
Similarly:
(with-output-to-string (out)
(3bmd::print-doc-to-stream-using-format
(3bmd-grammar:parse-doc (format nil "<div>~%~%- x~%- y~%~%</div>"))
out :html))
=> "<p><div></p>
<ul>
<li>x</li>
<li>y</li>
</ul>
</div>
"
If I add a newlines after the closing tag, the Markdown inside is not processed:
(with-output-to-string (out)
(3bmd::print-doc-to-stream-using-format
(3bmd-grammar:parse-doc (format nil "<div>~%~%- x~%- y~%~%</div>~%"))
out :html))
=> "<div>
- x
- y
</div>
"
For some reason, adding a space in front of the opening and closing tags unwraps the closing div:
(with-output-to-string (out)
(3bmd::print-doc-to-stream-using-format
(3bmd-grammar:parse-doc (format nil " <div>~%~%- x~%- y~%~% </div>~%"))
out :html))
=> "<p><div></p>
<ul>
<li>x</li>
<li>y</li>
</ul>
</div>
"
I'm trying to wrap a
divaround some Markdown and its HTML rendering with CSS, but the opening tag gets wrapped in ap, making it ineffective. Here is a small test case without any Markdown:I'd expect the output to be
<div></div>with two newlines in between them.Similarly:
If I add a newlines after the closing tag, the Markdown inside is not processed:
For some reason, adding a space in front of the opening and closing tags unwraps the closing div: