Page 1 of 1

Code Highlighting in Discussion Threads -- Literate Haskell

Posted: Tue Sep 21, 2021 11:43 pm
by ConstantClover
I would like to make a suggestion about code highlighting in the discussion threads. Highlighting for Literate Haskell does not work as expected. I would expect explanatory text to all be in black, but some of it comes out red. For example, please see my post of Problem 106 (https://projecteuler.net/thread=106;page=8#389261).

The code text is highiighted in green which is nice. Could it be fixed to give explanatory text all in black?

Alternatively, if we could manually specify the colour black, as with red ([r]red[/r]) or green ([g]green[/g]), that would also work well.

Re: Code Highlighting in Discussion Threads -- Literate Haskell

Posted: Wed Sep 22, 2021 5:38 pm
by euler
Unfortunately I don't have any control over custom management of the syntax colouring. We make use of the superb highlight.js library and it looks like your language is not currently supported:

https://github.com/highlightjs/highligh ... /languages

Maybe you, or someone else in your language community, could get in touch with them and offer to provide create a template to support the language so that they can add it to the list of supported languages.

Alternatively, you can use

Code: Select all

[code=Literate Haskell*]
at PE and it will display your preferred language, but disable syntax highlighting.

Re: Code Highlighting in Discussion Threads -- Literate Haskell

Posted: Thu Sep 23, 2021 11:27 pm
by ConstantClover
Excellent! That works too. Thanks, Euler!

(Keep up the great work! :) )