Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCaml: The 'match' keyword is not highlighted #1565

Open
chshersh opened this issue Jan 5, 2025 · 0 comments
Open

OCaml: The 'match' keyword is not highlighted #1565

chshersh opened this issue Jan 5, 2025 · 0 comments
Labels

Comments

@chshersh
Copy link

chshersh commented Jan 5, 2025

First of all, thanks a lot for creating this project! I use it quite often to share code snippets on my X account. And I'm really grateful for you to implementing it and supporting my favourite languages!

Describe the bug

I noticed that the match keyword is not highlighted in OCaml code snippets. See the below example:

To Reproduce
Steps to reproduce the behavior:

  1. Go to carbon.now.sh
  2. Choose OCaml
  3. Type simple code like let example = match 0 with 0 -> 0
  4. See that the match keyword is not highlighted

Expected behavior

match is highlighted as keyword

Screenshots

image

Info (please complete the following information):

Possible culprit

I see that Carbon uses highlight.js here

.map(lang => [lang, require(`highlight.js/lib/languages/${lang}`)])

But looks like highlight.js actually recognieses match as a keyword, so I'm not sure what's happening.

https://github.com/highlightjs/highlight.js/blob/62f8a60a302718b625fa6f81a0aae35cdf824fea/src/languages/ocaml.js#L20

@chshersh chshersh added the bug label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant