Code Highlighting in Discussion Threads -- Literate Haskell

Announcements, comments, ideas, feedback, and "How do I... ?" questions
Post Reply
User avatar
ConstantClover
Posts: 7
Joined: Sun Dec 06, 2020 10:21 pm

Code Highlighting in Discussion Threads -- Literate Haskell

Post 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.
User avatar
euler
Administrator
Posts: 5095
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

Re: Code Highlighting in Discussion Threads -- Literate Haskell

Post 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.
Image
impudens simia et macrologus profundus fabulae
User avatar
ConstantClover
Posts: 7
Joined: Sun Dec 06, 2020 10:21 pm

Re: Code Highlighting in Discussion Threads -- Literate Haskell

Post by ConstantClover »

Excellent! That works too. Thanks, Euler!

(Keep up the great work! :) )
Post Reply