Skip to content
New issue

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

viewcode does not respect highlight_options #13303

Open
panda-34 opened this issue Feb 5, 2025 · 0 comments
Open

viewcode does not respect highlight_options #13303

panda-34 opened this issue Feb 5, 2025 · 0 comments
Labels

Comments

@panda-34
Copy link

panda-34 commented Feb 5, 2025

Describe the bug

when viewcode calls highlighter for the source file
it does not provide opts parameter which should contain highlight_options from conf.py
so it is impossible to customize lexers for source code the same way as for code blocks
(Note, that if lang == 'default', highlight_options['python'] must be selected)

Environment Information

Platform:              win32; (Windows-8.1-6.3.9600-SP0)
Python version:        3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)])
Python implementation: CPython
Sphinx version:        8.1.3
Docutils version:      0.21.2
Jinja2 version:        3.1.2
Pygments version:      2.19.1

Sphinx extensions

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant