yogthos / markdown-clj

Markdown parser in Clojure
Eclipse Public License 1.0
540 stars 120 forks source link

feat: allow control of <pre> class for prism code blocks. #199

Closed BerkeleyTrue closed 5 months ago

BerkeleyTrue commented 5 months ago

Prism requires you to use code blocks within pre blocks with "language-xxx" classes. Currently there is an option to set code class through code-style option. For proper syntax highlight, we would need access to pre class in the same way.

Prism forces you to use the correct element for marking up code: <code>. On its own for inline code, or inside a <pre> for blocks of code. In addition, the language is defined through the way recommended in the HTML5 draft: through a language-xxxx class.
yogthos commented 5 months ago

Any chance you'd be up to do a pr for the feature? :)