Repository navigation
Document a custom Pygments style configuration example - #14722
Closed
mustafacicek-eee wants to merge 1 commit into
Closed
mustafacicek-eee wants to merge 1 commit into
mustafacicek-eee wants to merge 1 commit into
Conversation
AI-assisted implementation and validation by OpenAI Codex.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Document how to configure a custom Pygments style through
pygments_style. The example definesProjectStylein an importable module, adds the module directory tosys.pathusing a path anchored toconf.py, and selects the style by its fully qualified string name. It copiesDefaultStyle.stylesso that changing comments and keywords preserves the other default token styles.The change adds 35 lines to
doc/usage/configuration.rst.References
Validation
Run locally on macOS with Python 3.14.8, Sphinx 9.1.1, Pygments 2.21.0 and Docutils 0.22.4:
sphinx-lint doc/usage/configuration.rstpassed.pytest tests/test_highlighting.py -q: 5 passed.-W. Generated HTML/CSS contained the expected comment and keyword styles, and an unchanged string token retained its default style.AI Disclosure
OpenAI Codex researched the issue, generated all 35 added documentation lines (including both Python examples), executed the validation, and generated this PR title and description. At the account owner's explicit request, Codex also created the branch and submitted this draft PR.
This submission does not claim that the account owner personally wrote the change or performed a human review. Sphinx's AI policy requires human review, human submission and human-written communication; this automated draft does not establish that those requirements have been met. It is therefore left as a draft.