Skip to content

Conversation

sourrust
Copy link
Member

Added haskell highlighting

@isagalaev
Copy link
Member

Hello Jeremy,

Haskell is very nice to have, thank you! Here are some comments to make this ready for merge:

  • Could you provide a short fragment of Haskell into the test.html. Also, check out Contributor checklist. I can usually make a mode reference myself but I don't know Haskell at all to make a reasonable code snippet.
  • You can safely drop 'illegal' from defaultMode since it's empty

Otherwise everything looks nice!

@sourrust
Copy link
Member Author

All right, added the test in test.html along with the AUTHOR.en.txt and readme.

@isagalaev
Copy link
Member

Merged it, thanks!
I've altered the language a bit because it was very greedy and tried to highlight five other languages:

  • 'label' mode now has relevance: 0 because its description is general enough to match almost all identifiers
  • dropped single-letters ops from built_ins (+, *, etc.) since this also makes other languages to be detected as Haskell and it doesn't make sense to have special styling for them anyway

Sannis pushed a commit to Sannis/highlight.js that referenced this pull request Dec 17, 2013
stansw pushed a commit to StanislawSwierc/highlight.js that referenced this pull request Nov 1, 2017
GerHobbelt pushed a commit to GerHobbelt/highlight.js that referenced this pull request May 7, 2018
…ibute

Adds lang attribute to highlighted blocks (optional)
GerHobbelt pushed a commit to GerHobbelt/highlight.js that referenced this pull request May 7, 2018
GerHobbelt pushed a commit to GerHobbelt/highlight.js that referenced this pull request May 7, 2018
jjjjw added a commit to jjjjw/highlight.js that referenced this pull request Sep 11, 2018
GerHobbelt pushed a commit to GerHobbelt/highlight.js that referenced this pull request May 9, 2020
Add test coverage, language detection, highlight `using`
gg582 added a commit to gg582/highlight.js that referenced this pull request Aug 2, 2025
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants