highlightjs / highlight.js

JavaScript syntax highlighter with language auto-detection and zero dependencies.
https://highlightjs.org/
BSD 3-Clause "New" or "Revised" License
23.65k stars 3.59k forks source link

(Haskell) GADT syntax highlighted incorrectly #3753

Open marcosh opened 1 year ago

marcosh commented 1 year ago

Describe the issue

The where keyword in the Haskell GADT syntax is not highlighted correctly

Which language seems to have the issue?

haskell

Are you using highlight or highlightAuto?

highlightElement

Sample Code to Reproduce

https://jsfiddle.net/8j5zb4ny/1/

Expected behavior

The where keyword at the end of the first line should get a different highlighting to show that it is not a type variable

joshgoebel commented 1 year ago

Thanks for report. PR would be welcome... probably just need to add where as a keyword inside a data block.

Somarfagell commented 1 year ago

Hello!, I'm searching for some open source first issue and this one seems great, Can I work on this?

joshgoebel commented 1 year ago

Sure.

Somarfagell commented 1 year ago

I,ve checked everything and adding 'where' inside the data block as mentioned fixed this, also tested everything and everything seems fine, checking the PR :)).

image