The highlight js code runs on all code blocks

Created on 6 October 2025, about 4 hours ago

Problem/Motivation

At the moment whenever a piece of code is wrapped in a <code> block the library is automatically used.

I don't think that's desirable.

You'd want to have it fired on code block (<pre><code>

). But you also want to be able to add inline code like this in a text where you don't want to library.

Steps to reproduce

Add code blocks with and without

 around it and you'll notice the library is always fired.

Proposed resolution

Alter the JS so it's only fired on <pre><code>

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇧🇪Belgium f0ns

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024