cobalt.rs icon indicating copy to clipboard operation
cobalt.rs copied to clipboard

{% highlight %} does not respect disabling of syntax highlighting

Open tkornack opened this issue 5 years ago • 3 comments

The html generated from markdown is exceptionally clean, with the exception of the code blocks, which have a fixed styling like this:

<pre style="background-color:#2b303b;">
<span style="background-color:#2b303b;color:#c0c5ce;">ans = 42;
</span></pre>

It would be so much better if the code blocks emitted the <code> tag without the fixed color syling, which would then allow us to style it using css.

tkornack avatar May 13 '19 18:05 tkornack

So I'm seeing two bugs here

  1. We are not documenting support for disabling syntax highlighting (added in #407)
  2. Disabling of highlighting is limited to markdown code fences and needs to be extended to liquid {% highlight %} blocks. The workaround would be to instead use markdown code fences.

epage avatar May 13 '19 19:05 epage

Classifying this as a bug due to the inconsistent behavior.

epage avatar May 13 '19 19:05 epage

Oh, thanks!

syntax_highlight:
  enabled: false

works perfectly.

tkornack avatar May 13 '19 19:05 tkornack

This was fixed in https://github.com/cobalt-org/cobalt.rs/pull/973 and released in v0.18.0

rdimartino avatar Aug 26 '22 21:08 rdimartino