borkdude/quickblog

Literal <code> block drops white-space

Opened this issue · 3 comments

Markdown input:

<pre>
<code>
(def newline-should-start
    :here)
</code>
</pre>

Expected output (should work the same as a markdown code-block literal):
"<pre><code>&#40;def newline-should-start\n :here&#41;</code></pre>"

Actual output:
"<pre> <code> (def newline-should-start :here) </code> </pre>"

Looking over markdown-clj, I think you're right:

https://github.com/yogthos/markdown-clj#limitations

I guess that means quickblog is incompatible with cljs-showcase when it comes to multiline code snippets, since there's no way to write a markdown code block that will emit an html attribute (other than style="lang-clojure"). I wonder what workarounds are possible. Would you consider making quickblog's markdown parser pluggable?

I'm open to that, but I don't know any markdown parser that is bb compatible other than markdown-clj