Created
June 2, 2019 11:47
-
-
Save crowsonkb/4e2eb4439e3fe514cc4755b217f164d5 to your computer and use it in GitHub Desktop.
Monkey patching pygments inside Sphinx documentation configuration
This file contains 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
# The name of the Pygments (syntax highlighting) style to use. | |
sys.path.append('.') | |
import pygments.styles | |
import base16_spacemacs_kat | |
# pygments.styles.base16_spacemacs_kat = base16_spacemacs_kat | |
sys.modules['pygments.styles.' + 'base16_spacemacs_kat'] = base16_spacemacs_kat | |
pygments.styles.STYLE_MAP['base16-spacemacs-kat'] = 'base16_spacemacs_kat::Base16SpacemacsStyle' | |
pygments_style = 'base16-spacemacs-kat' # 'friendly' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for creating this gist. I found it to be most useful! https://github.com/aroberge/friendly-traceback/blob/master/friendly_traceback/friendly_rich.py#L20