# How to disable syntax highlighting?

**URL:** <https://talk.jekyllrb.com/t/how-to-disable-syntax-highlighting/3973>\
**Category:** Help\
**Created:** [February 25, 2020, 11:36pm UTC](https://talk.jekyllrb.com/t/how-to-disable-syntax-highlighting/3973 "2020-02-25T23:36:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vindarel](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@vindarel](https://talk.jekyllrb.com/u/vindarel)\
**Post date:** [February 25, 2020, 11:36pm UTC](https://talk.jekyllrb.com/t/how-to-disable-syntax-highlighting/3973/1 "2020-02-25T23:36:06Z")

</div>

Hello,

After having fixed the syntax highlighting for the last Jekyll (on Github pages), I would like now to _dis_able it (in order to use another library, in JS, more accurate for the language).

We are using kramdown for markdown processing:

```
markdown: kramdown

```

I tried the following settings:

```auto
kramdown:
  input: false
  highlighter: false
  syntax_highlighter: false
  enable_coderay: false

```

this didn’t change anything, the `<code>` tags are still processed and are rendered with `<p>` HTML elements that get the CSS class of the highlighter. As a consequence, the `<code>` tags don’t contain the code as a string anymore, but a bunch of HTML. The JS highlighter can do nothing with them.

This had an effect:

```auto
redcarpet:
  extensions:
    no_fenced_code_blocks: true

```

it disabled the fenced code blocks, but it’s too much: this block

````
   ```lang
    def foo(): pass
   ```

````

is rendered as

```
lang def foo(): pass 

```

note the prefix “lang” + the `<code>` tag doesn’t get the “lang” class.

Interestingly, the fenced blocks delimited with tildes (`~~~lang`) still get syntax highlighting.

So I’d like something in between, like it was with Jekyll 3.6.3: extract the fenced code blocks into `<code>` tags with their class name, but not rendered as an inner HTML.

I feel I’m not that far, reading [Markdown Options | Jekyll • Simple, blog-aware, static sites](https://jekyllrb.com/docs/configuration/markdown/#redcarpet)

> With both fenced code blocks and highlighter enabled, this will statically highlight the code; without any syntax highlighter, it will add a `class="LANGUAGE"` attribute to the `<code>` element, which can be used as a hint by various JavaScript code highlighting libraries.

But how to not have any highlighter?

Thanks.

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [February 26, 2020, 2:21am UTC](https://talk.jekyllrb.com/t/how-to-disable-syntax-highlighting/3973/2 "2020-02-26T02:21:24Z")

</div>

> **[Disable Jekyll’s default syntax highlighter Rouge](https://medium.com/@vilcins/disable-jekylls-default-syntax-highlighter-rouge-12130ccac779)**
>
> By default, Jekyll has Rouge syntax highlighter. In some cases, you may want to disable it. To get Rouge disabled in Jekyll, just do the…

`highlighter: none`

I have not tested it, just posting what I found.

---

<div class="post-metadata">

**Author:** ![vindarel](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@vindarel](https://talk.jekyllrb.com/u/vindarel)\
**Post date:** [February 26, 2020, 11:13am UTC](https://talk.jekyllrb.com/t/how-to-disable-syntax-highlighting/3973/3 "2020-02-26T11:13:24Z")

</div>

That does it, thank you.

You have good Google skills 🙂

---

<div class="post-metadata">

**Author:** ![vindarel](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@vindarel](https://talk.jekyllrb.com/u/vindarel)\
**Post date:** [February 26, 2020, 11:29am UTC](https://talk.jekyllrb.com/t/how-to-disable-syntax-highlighting/3973/4 "2020-02-26T11:29:10Z")

</div>

“highlighter: none” yields a Github-pages warning (on production, not locally). The important part is

```
kramdown:
    syntax_highlighter_opts:
      disable: true
```
