# Syntax highlighting not working in a post on my site

**URL:** https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605
**Category:** Support
**Created:** [November 16, 2025, 3:59pm UTC](https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605 "2025-11-16T15:59:55Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [November 16, 2025, 3:59pm UTC](https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605/1 "2025-11-16T15:59:56Z")

</div>

Hi, had no problems with syntax highlighting on my site appart in that [particular post](https://dessein-tech.com/t/une-petite-lisp-avec-ia/9198), for an unknown reason, any idea? (I forced lisp syntax)

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [November 16, 2025, 4:39pm UTC](https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605/2 "2025-11-16T16:39:21Z")

</div>

Does it work in [safe mode](https://meta.discourse.org/t/53504?silent=true)?

---

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [November 16, 2025, 4:51pm UTC](https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605/3 "2025-11-16T16:51:40Z")

</div>

Yes it does. Didn’t think about trying because all the other posts work.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [November 24, 2025, 6:44pm UTC](https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605/4 "2025-11-24T18:44:26Z")

</div>

@patrickemin what do you want to do with this topic? Should we delete it or is there an actual problem here you need help with? If so can you provide enough detail so we can help you and maybe a screnshot?

---

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [November 24, 2025, 6:49pm UTC](https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605/5 "2025-11-24T18:49:56Z")

</div>

Actually, I still have this problem: syntax highlighting doesn’t work for this particular post, but it works for all the others. And so, after testing in [safe mode](https://meta.discourse.org/t/53504?silent=true), syntax highlighting works for all posts. This does not explain why, for this particular post, which is nothing out of the ordinary, syntax highlighting does not work when not in [safe mode](https://meta.discourse.org/t/53504?silent=true).

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [November 24, 2025, 7:06pm UTC](https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605/6 "2025-11-24T19:06:34Z")

</div>

If you were to copy/paste that post into a PM here, would it work?

---

<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: [November 24, 2025, 7:12pm UTC](https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605/7 "2025-11-24T19:12:34Z")

</div>

From what I can tell, I think it’s the [Code-block line numbers](https://meta.discourse.org/t/code-block-line-numbers/330130) theme component. Specifically with the `lisp` language.

Are there other snippets in lisp that work in other posts? (Just to help narrow down if it’s something specific to that codeblock or if it’s the lisp syntax itself)

---

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [November 24, 2025, 7:25pm UTC](https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605/8 "2025-11-24T19:25:40Z")

</div>

> [@JammyDodger](#):
>
> Are there other snippets in lisp that work in other posts? (Just to help narrow down if it’s something specific to that codeblock or if it’s the lisp syntax itself)

Yes it’s working everywhere else, for example [here](https://dessein-tech.com/t/cest-bientot-noel-enfin-presque/9242).

---

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [November 24, 2025, 7:34pm UTC](https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605/9 "2025-11-24T19:34:00Z")

</div>

> [@JammyDodger](#):
>
> From what I can tell, I think it’s the [Code-block line numbers](https://meta.discourse.org/t/code-block-line-numbers/330130) theme component. Specifically with the `lisp` language.

Well actually there are two TCs, syntax highlighting and line numbering that should act when I post code on my site, line numbering works but syntax highligting does not ( **only for that post** )

And it seems that I wasn’t very clear when I made my request. I’ll try to rephrase it as best I can below. On my Discourse site, someone posted a message containing autolisp programming code. Normally, with the two components I have installed on my site, which are syntax highlighting and automatic line numbering, this code should be numbered automatically and the lisp language syntax should appear highlighted. This does not work, and I want to emphasize that it is only for this post, because it works for all the others. So only for this post, the line numbering works fine, in fact, I have never reported this problem. **But the syntax highlighting does not work**. I don’t know why this component theme does not work for this post only, and why it works for all the others.

---

<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: [November 24, 2025, 7:39pm UTC](https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605/10 "2025-11-24T19:39:32Z")

</div>

I think it may be the size of the snippet. When I (very roughly :slight_smile:) chop out a chunk of the first one to make it smaller it then highlights as expected.

(In combination with the codeblock line numbering theme component)

---

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [November 24, 2025, 7:42pm UTC](https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605/11 "2025-11-24T19:42:26Z")

</div>

Ah ok that could be a hint. In fact, I quickly checked and I probably never had a code of that length on my site (I do not know what the maximum length is)

---

<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: [November 24, 2025, 7:45pm UTC](https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605/12 "2025-11-24T19:45:44Z")

</div>

If you disable the line numbering component you should be able to see that the highlighting works as expected (like in [safe mode](https://meta.discourse.org/t/53504?silent=true), but more specific). So it appears to be a limitation in the theme component. I’m not sure on the specifics though.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [December 3, 2025, 2:38am UTC](https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605/13 "2025-12-03T02:38:48Z")

</div>

@patrickemin have you figured this out? From JammyDodger’s assessment, it seems to be related to te line numbering component, which seems to not work for larger code blocks.

---

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [December 3, 2025, 3:08pm UTC](https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605/14 "2025-12-03T15:08:44Z")

</div>

Hi, actually yes if I deactivate the line numbering the syntax highlighting works even on long codes.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [January 2, 2026, 3:09pm UTC](https://meta.discourse.org/t/syntax-highlighting-not-working-in-a-post-on-my-site/388605/15 "2026-01-02T15:09:31Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
