I use Sphinx to make a website that contains code samples.
I\'m successful using the .. code-block
directive to get syntax highlighting.
But I can\'t get inline syn
This can be fixed by adding 'sphinxcontrib.inlinesyntaxhighlight'
extension in conf.py
:
extensions = [ 'sphinxcontrib.inlinesyntaxhighlight' ]
# use language set by highlight directive if no language is set by role
inline_highlight_respect_highlight = False
# use language set by highlight directive if no role is set
inline_highlight_literals = False
Extension documentation
The extension is available here and on PyPi.