turn off syntax highlighting in non-code code boxes

Discussion about the site's wikis, including bugs/issues encountered.

Moderator: Moderators

Post Reply
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

turn off syntax highlighting in non-code code boxes

Post by jeffythedragonslayer »

This question is about the old wiki. If this is not the right forum to ask this question in, feel free to move it.

I've noticed that some of the syntax highlighting is being applied to things that aren't code. Sometimes it looks fine, but other times I think the colors make the information harder to understand, because there is no apparent reason why something should be one color or another.

For example, on this page, in the box in the section "Communication Ports," I don't see any apparent reason why some ports are red, green, or orange. This sometimes causes me to look for meaning in the colors that isn't there.

https://wiki.superfamicom.org/spc700-reference

Does anyone know how to turn off syntax highlighting in some of these boxes?
User avatar
Ben Boldt
Posts: 1149
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: turn off syntax highlighting in non-code code boxes

Post by Ben Boldt »

It looks like ``` is the markup for code? In the nesdev wiki, all you have to do to get a non-colored monospaced plain text area is to have a leading space on each line. Does that work there?
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: turn off syntax highlighting in non-code code boxes

Post by Drag »

Ben Boldt wrote: Mon Jun 13, 2022 9:21 pm It looks like ``` is the markup for code? In the nesdev wiki, all you have to do to get a non-colored monospaced plain text area is to have a leading space on each line. Does that work there?
Using ``` to mark code blocks is pretty standard markdown notation. Sometimes, markdown parsers allow you to specify what the language is, so the highlighting works properly. If this is the case, text should be the the "language" for "no highlighting":

Code: Select all

```text
If the parser supports specifying the language,
there should be no highlighting here when this is rendered.
foo();
```
So try that out on the superfamicom.org wiki and see if that works. If not, it's just a wiki, so maybe using <pre></pre> tags would work instead?
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: turn off syntax highlighting in non-code code boxes

Post by jeffythedragonslayer »

I tried adding leading spaces and thought it worked, until I realized that none of the code boxes are syntax highlighted in the preview. I'm trying not to clog up the edit history with too many changes back and forth, so I think we should probably wait until that's fixed.
Post Reply