<code> block inside <pre> block should be preformatted
HenryS1 opened this issue · 0 comments
HenryS1 commented
Many syntax highlighters (for instance highlight.js and prismjs) expect code to be in <pre><code>
blocks. However, when I put code inside a code block the whitespace for formatting it disappears. Here's an example:
CL-USER> (spinneret:with-html-string (:pre (:code "(defun blah ()
(+ 1 2))")))
"<pre>
<code>(defun blah () (+ 1 2))</code></pre>"
I'd expect the result to be
"<pre><code>(defun blah ()
(+ 1 2))</code></pre>"
Perhaps this could be resolved by adding :code
to the *preformatted*
list.