Skip to content

Add .go (generic output) Pygments styling to code boxes? #308

@cmgoold

Description

@cmgoold

One of the nice features of the original RTDs Sphinx theme is that generic prompts/generic outputs (i.e. .gp and .go pygment highlight classes, respectively) are recognised in code boxes. For instance, the following:

>>> [1, 2, 3]
    [1, 2, 3]

would show the console output in gray/another color, to indicate the output of an interactive Python session.

This is a minor change but useful for writing code examples in documentation. While users can just add some custom CSS for this, I wondered if it would make sense to add this directly? I find #bdbdbd plays nicely with the current colour schemes.

I'd be happy to add something like this, if it's of interest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions