Better handling code block
Closed this issue · 2 comments
yujonglee commented
https://github.com/letmutex/htmd/blob/main/src/element_handler/code.rs
Seems like built-in code tag handler only consider class attribute in code tag.
However, for both prismjs
and highlightjs
, the actual structure is
<pre class="language-rs"><code>CONTENT</code></pre>
To support this, I guess we need to modify handler interface.
letmutex commented
Thanks for reporting this.
It should not be difficult to access the attrs of the parent node using the current tag handler, will open a PR later.
letmutex commented
Done in v0.1.5