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

Syntax highlighting style 'catppuccin-macchiato' not showing highlighted lines #11862

Closed
skrysmanski opened this issue Jan 6, 2024 · 4 comments

Comments

@skrysmanski
Copy link

When selecting 'catppuccin-macchiato' as highlighting style like so:

markup:
  highlight:
    style: 'catppuccin-macchiato'

And then writing some code with highlighted lines:

```html {hl_lines="3 6"}
<html>
  <head>
    <title>Hello, HTML</title>
  </head>
  <body>
    <p>Some text here</p>
  </body>
</html>
```

Then the two lines are not highlighted properly:

highlight-wrong

After some digging, I found out that the 'catppuccin-macchiato' style accidentally uses color instead of background-color for its line highlighting. I.e. it uses

.chroma .hl { color: #494d64 }

but should be using:

.chroma .hl { background-color: #494d64 }

So if I switch this (by jumping through some hoops), it looks as expected:

highlight-correct

I know this might be the wrong repo for filing this (the bug could be in the Chroma or even in the Pygments repo). Unfortunately, I'm no Go developer - so I couldn't really describe the problem in the other repos. So my hope is - if you find this bug is not a Hugo bug per se - that you'll file a bug repo in the appropriate repo. Thanks :)

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.121.2-6d5b44305eaa9d0a157946492a6f319da38de154+extended windows/amd64 BuildDate=2024-01-05T12:21:15Z VendorInfo=gohugoio

Does this issue reproduce with the latest release?

Yes

@jmooring
Copy link
Member

jmooring commented Jan 6, 2024

This problem was introduced in v0.119.0 when we bumped alecthomas/chroma from v2.8.0 to v2.9.1 with f0d32455.

Chroma introduced the problem in v2.9.0 with 0e7ec95a1, which affected all four of the "catppuccin" style variants.

See upstream issue alecthomas/chroma#910.

@icy-comet
Copy link

icy-comet commented Jan 6, 2024

It was an oversight at my end @skrysmanski. Until, the embedded chroma version is bumped again, you could manually override the chroma styles as mentioned here. Thanks for catching it @jmooring.

@skrysmanski
Copy link
Author

Thank you both for the quick work/fix. :)

Copy link

github-actions bot commented Apr 5, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants