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

Not generating the correct Chroma styles for syntax highlighting themes #12580

Closed
aamnah opened this issue Jun 8, 2024 · 2 comments · Fixed by #12581
Closed

Not generating the correct Chroma styles for syntax highlighting themes #12580

aamnah opened this issue Jun 8, 2024 · 2 comments · Fixed by #12581

Comments

@aamnah
Copy link

aamnah commented Jun 8, 2024

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

$ hugo version
hugo v0.127.0-74e0f3bd63c51f3c7a0f07a7c779eec9e922957e+extended linux/amd64 BuildDate=2024-06-05T10:27:59Z VendorInfo=snap:0.127.0

Does this issue reproduce with the latest release?

Yes, i have the issue on version 0.127.0

Hugo is not generating the correct Chroma styles

I am using the following command

hugo gen chromastyles --style tokyonight-night > tokyonight-night.css

It does generate the styles, but the styles themself are incorrect and do not match the originals. The same styles are generated for various themes.

The following themes had wrong stylesheets generated:

For example, the original chroma XML stylesheet for tokyonight-night has the following code

<entry type="Background" style="bg:#1a1b26 #c0caf5"/>

but the generated stylesheet with hugo gen chromastyles has

/* Background */ .bg { color:#e5e5e5;background-color:#000; }

I'm installing the styles mentioned here and comparing them with the original code here

@bep bep added this to the v0.128.0 milestone Jun 8, 2024
@jmooring
Copy link
Member

jmooring commented Jun 8, 2024

The tokyonight styles were added to github.com/alecthomas/chroma in v2.14.0 which was released on 22 May 2024. We're still using v2.13.0.

Copy link

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 Jun 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants