##// END OF EJS Templates
back to dev
back to dev

File last commit:

r28445:e845b6fd
r28492:dea1326b
Show More
ipython_console_highlighting.py
24 lines | 881 B | text/x-python | PythonLexer
/ IPython / sphinxext / ipython_console_highlighting.py
Fernando Perez
Update docs for automatic API building.
r1850 """
chebee7i
Update code for making sphinx aware of IPython console lexer.
r13631 reST directive for syntax-highlighting ipython interactive sessions.
Fernando Perez
Update docs for automatic API building.
r1850
chebee7i
Update code for making sphinx aware of IPython console lexer.
r13631 """
Fernando Perez
Update docs for automatic API building.
r1850
Fernando Perez
Add the matplotlib sphinx extensions, authored by the MPL team.
r1694 from sphinx import highlighting
Thomas Kluyver
Move IPython lexers module to lib...
r20625 from IPython.lib.lexers import IPyLexer
Brian Granger
Cleanup of docs....
r2275
def setup(app):
"""Setup as a sphinx extension."""
# This is only a lexer, so adding it below to pygments appears sufficient.
chebee7i
Update code for making sphinx aware of IPython console lexer.
r13631 # But if somebody knows what the right API usage should be to do that via
Brian Granger
Cleanup of docs....
r2275 # sphinx, by all means fix it here. At least having this setup.py
# suppresses the sphinx warning we'd get without it.
Michael Droettboom
Support parallel sphinx building
r21874 metadata = {'parallel_read_safe': True, 'parallel_write_safe': True}
return metadata
Brian Granger
Cleanup of docs....
r2275
chebee7i
lexerself -> lexer.
r13652 # Register the extension as a valid pygments lexer.
chebee7i
Update code for making sphinx aware of IPython console lexer.
r13631 # Alternatively, we could register the lexer with pygments instead. This would
# require using setuptools entrypoints: http://pygments.org/docs/plugins
Samuel Gaist
Cleanup Python 2 compact from Lexers
r28445 highlighting.lexers["ipython"] = IPyLexer()
highlighting.lexers["ipython3"] = IPyLexer()