Skip to content

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

Closed

Description

@aamnah

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

Activity

  1. added this to the v0.128.0 milestone on Jun 8, 2024
  2. jmooring commented on Jun 8, 2024

    @jmooring
    Member

    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.

  3. added a commit that references this issue on Jun 8, 2024
    bd358f5
  4. added a commit that references this issue on Jun 8, 2024
    8cf94ae
  5. github-actions commented on Jun 30, 2024

    @github-actions

    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.

  6. locked as resolved and limited conversation to collaborators on Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions