Disable Syntax Highlighting?


(Peter N Lewis) #1

Is there a way to have a code block (ie tree backticks) without syntax highlighting? Like a “none” language? Eg for pseudocode or the like without defined syntax.

for each file in folder
   do stuff

(cpradio) #2

You can delete all the entries in the setting highlighted languages

Also using the 4 spaces to indent avoids highlighting.

for each file in folder
   do stuff

(Peter N Lewis) #3

Umm, no, that’s not what I had in mind - I like the highlighting in general, I just want a way to disable it in a particular case.

It seems like specifying no language, or any language, or an invalid language all get some for of syntax highlighting.

Maybe there is some other setting I have misconfigured?


(cpradio) #4

Yes, it tries to auto-detect a language.

You will want to use the 4 spaces to indent if you don’t want highlighting. (see my edited post above)


(Sam Saffron) #5

You simply hint the block with text


(Peter N Lewis) #6

So as in three back ticks and the “text”?

I see that works here, but not on my forum, is that something recent? Or do I need to add it as a language?


(Kane York) #7
```text
 foo
```

is what you need to do, that’s what “hinting” means


(Peter N Lewis) #8

Yes, “text” was what I needed to know. And it didn’t work on my site for the same reason I failed at code blocks last time - four back ticks. Sigh.

Thanks.