# Disable Syntax Highlighting?

**URL:** https://meta.discourse.org/t/disable-syntax-highlighting/44364
**Category:** Support
**Created:** [May 17, 2016, 2:38am UTC](https://meta.discourse.org/t/disable-syntax-highlighting/44364 "2016-05-17T02:38:39Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![peternlewis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/peternlewis/32/108888_2.png) [@peternlewis](https://meta.discourse.org/u/peternlewis)
#### Post date: [May 17, 2016, 2:38am UTC](https://meta.discourse.org/t/disable-syntax-highlighting/44364/1 "2016-05-17T02:38:39Z")

</div>

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.

```none
for each file in folder
   do stuff

```

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [May 17, 2016, 2:43am UTC](https://meta.discourse.org/t/disable-syntax-highlighting/44364/2 "2016-05-17T02:43:45Z")

</div>

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

```

---

<div class="post-metadata">

### Author: ![peternlewis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/peternlewis/32/108888_2.png) [@peternlewis](https://meta.discourse.org/u/peternlewis)
#### Post date: [May 17, 2016, 3:09am UTC](https://meta.discourse.org/t/disable-syntax-highlighting/44364/3 "2016-05-17T03:09:49Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [May 17, 2016, 3:10am UTC](https://meta.discourse.org/t/disable-syntax-highlighting/44364/4 "2016-05-17T03:10:36Z")

</div>

> [@peternlewis](#):
>
> It seems like specifying no language, or any language, or an invalid language all get some for of syntax highlighting.

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)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [May 17, 2016, 3:31am UTC](https://meta.discourse.org/t/disable-syntax-highlighting/44364/5 "2016-05-17T03:31:55Z")

</div>

You simply hint the block with text

---

<div class="post-metadata">

### Author: ![peternlewis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/peternlewis/32/108888_2.png) [@peternlewis](https://meta.discourse.org/u/peternlewis)
#### Post date: [May 17, 2016, 3:41am UTC](https://meta.discourse.org/t/disable-syntax-highlighting/44364/6 "2016-05-17T03:41:04Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [May 17, 2016, 4:07am UTC](https://meta.discourse.org/t/disable-syntax-highlighting/44364/7 "2016-05-17T04:07:57Z")

</div>

````
```text
 foo
```

````

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

---

<div class="post-metadata">

### Author: ![peternlewis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/peternlewis/32/108888_2.png) [@peternlewis](https://meta.discourse.org/u/peternlewis)
#### Post date: [May 17, 2016, 4:11am UTC](https://meta.discourse.org/t/disable-syntax-highlighting/44364/8 "2016-05-17T04:11:29Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 8, 2024, 12:45pm UTC](https://meta.discourse.org/t/disable-syntax-highlighting/44364/9 "2024-06-08T12:45:41Z")

</div>

This topic was automatically closed after 2944 days. New replies are no longer allowed.
