Skip to content

Whitespace in code receives underline for some themes, which can be confused with a _ character #2020

@abravalheri

Description

@abravalheri

Hello, let me get this opportunity to first thank the authors and maintainers for the amazing package.
I also would like to apologize in advance if I am submitting the issue to the wrong repository.

Recently on setuptools, we received a bug report regarding our documentation: pypa/setuptools#2999.

It seems that after the latest versions of pygments got released the default dark theme used in Sphinx for pygments started showing underlined whitespace, which is confusing for users (as reported in the linked issue):

image

After some quick investigation:

image

image

I think the idea here is that the colour of the whitespace (.w class, currently #666666) should be the same as the background (#202020), but it ended up being misconfigured - at least that is what happens in the light version of the theme (no idea why it is necessary to preserve the underline configuration instead of just removing it).

However I could not find out if this theme is something Sphinx itself is providing (in that case it would be better to open an issue there, right?), or if it comes directly from pygments.

My hypothesis is that this is a consequence of the whitespace improvements introduced in 2.11.0.

Do you guys have any advice/information about this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-themingarea: changes to themes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions