Long code blocks get no higlighting

I noticed that long code blocks get no highlighting - like e.g. 36k+ symbols or somewhat around that. How can I fix it?

Limit was added here:

We tried moving highlight to a dedicated worker (and consequently a background thread) but hit some issues around CORS.

If you want to lift the limit a good approach is taking this PR

and trying to fix the CORS issues it had and made it be reverted.

3 Likes

So is Discourse team going to fix it eventually?

It’s not in our roadmap at the moment. While getting the highlight working in a background worker is nice to have, the impact of the limit is low considering how popular code blocks of over 30000 characters are in typical discussions.

3 Likes

Could you please at least expose that 30000 number as a configuration? Possibly in the container .yml file? Or in the Settings? Whatever way would work, I just need to increase that limit.