Downloaded html comes with 'hljs*' classes
hugotiburtino opened this issue · 1 comments
I suppose the majority of those who want to download the md as html doesn't want to get it with tags full of 'hljs' classes. Here a snippet of the a downloaded file:
<pre><code class="language-css"><span class="hljs-selector-class">.markdownRoot</span> {
<span class="hljs-attribute">margin</span>: <span class="hljs-number">0</span> auto;
<span class="hljs-attribute">max-width</span>: <span class="hljs-number">888px</span>;
<span class="hljs-attribute">padding</span>: <span class="hljs-number">45px</span>;
<span class="hljs-attribute">border</span>: lightgrey thin solid;
}
</code></pre>
So this is only inside <pre>
tags. The quick workaround to remove them is simply to copy the rendered <pre>
tag contents as text back into the source code, as <pre>
tags by definition don’t change anything to the content of the tag (spacing etc.)
I’ll close as wontfix however, as these classes are required for the code highlighting to work. If this is really an issue we could make the HLJS integration optional, as are the other plugins of the markdown renderer. Then there would be no code highlighting and no hljs classes inside the <pre>
tags.