Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't turn off code highlighting in <xmp> elements #2295

Open
Quuxplusone opened this issue Jun 10, 2022 · 0 comments · May be fixed by #2391
Open

Can't turn off code highlighting in <xmp> elements #2295

Quuxplusone opened this issue Jun 10, 2022 · 0 comments · May be fixed by #2391
Labels
bug documentation An issue or PR about improving Bikeshed's documentation

Comments

@Quuxplusone
Copy link

I'm looking for a way to turn off syntax highlighting inside one specific <xmp> element. (They're highlighted as C++ by default, which is great, except for this one block, which I want to be plain text.) Things I've tried:

<xmp no-highlight>
$ bin/ubench --benchmark_display_aggregates_only=true --benchmark_repetitions=5 | grep mean
</xmp>

<xmp nohighlight>
$ bin/ubench --benchmark_display_aggregates_only=true --benchmark_repetitions=5 | grep mean
</xmp>

<xmp class="nohighlight">
$ bin/ubench --benchmark_display_aggregates_only=true --benchmark_repetitions=5 | grep mean
</xmp>

<xmp class="no-highlight">
$ bin/ubench --benchmark_display_aggregates_only=true --benchmark_repetitions=5 | grep mean
</xmp>

<div class="nohighlight"><xmp>
$ bin/ubench --benchmark_display_aggregates_only=true --benchmark_repetitions=5 | grep mean
</xmp></div>

My problem is that the rendered HTML invariably does

<pre class="highlight"><c- n>$</c-> <c- n>bin</c->[...]

and if I use <xmp class="nohighlight">, well, that just produces

<pre class="nohighlight highlight"><c- n>$</c-> <c- n>bin</c->[...]

Also, the current documentation inconsistently mentions both no-highlight and nohighlight, exactly once each, so I have no way to tell which is correct even if I understood how to use them.

@jyasskin jyasskin added bug documentation An issue or PR about improving Bikeshed's documentation labels Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug documentation An issue or PR about improving Bikeshed's documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants