We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
module.Class
Sphinx allows setting the pygments style not only via "stylename" but also via a string containing module.Class syntax (handled in https://github.com/sphinx-doc/sphinx/blob/35965903177c6ed9a6afb62ccd33243a746a3fc0/sphinx/highlighting.py#L112).
"stylename"
However, pydata-sphinx-theme doesn't support that syntax due to the following check:
pydata-sphinx-theme/src/pydata_sphinx_theme/pygment.py
Line 84 in 8bc48a9
(Using my own pygments style does work when I add an entry point as shown in https://github.com/pygments/pygments-plugin-scaffolding/blob/main/pyproject.toml)
Some more detail is in sphinx-doc/sphinx#9105 (comment)
The text was updated successfully, but these errors were encountered:
Agreed, seems like we should support the module.Class syntax too. Are you up for opening a PR to implement that?
Sorry, something went wrong.
I didn't immediately see how to do it, but I'll try to take another look.
In our codebase, the pygments is simply used to generate 2 custom stylesheets. They are both createde by this function:
Line 24 in fcde006
In short you create the classic html output and then encapsulate it in the correct "theme" selector.
If you can still perform this trick with a custom molude.Class syntax then the sanity check can be reduced to only "str" entries.
No branches or pull requests
Sphinx allows setting the pygments style not only via
"stylename"
but also via a string containingmodule.Class
syntax(handled in
https://github.com/sphinx-doc/sphinx/blob/35965903177c6ed9a6afb62ccd33243a746a3fc0/sphinx/highlighting.py#L112).
However, pydata-sphinx-theme doesn't support that syntax due to the following check:
pydata-sphinx-theme/src/pydata_sphinx_theme/pygment.py
Line 84 in 8bc48a9
(Using my own pygments style does work when I add an entry point as shown in https://github.com/pygments/pygments-plugin-scaffolding/blob/main/pyproject.toml)
Some more detail is in sphinx-doc/sphinx#9105 (comment)
The text was updated successfully, but these errors were encountered: