Skip to content
8 changes: 8 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,19 @@ def make_carousel_thumbs(app, exception):
issues_user_uri = 'https://github.com/{user}'


def maps_any_missing_reference_to_code_block(app, env, node, contnode):
if node['reftype'] == 'any':
contnode['classes'] = []
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain (and perhaps add a comment) how this results in code-like styling? Thanks.

return contnode
return None


def setup(app):
# to hide/show the prompt in code examples:
app.add_javascript('js/copybutton.js')
app.add_javascript('js/extra.js')
app.connect('build-finished', make_carousel_thumbs)
app.connect('missing-reference', maps_any_missing_reference_to_code_block)


# The following is used by sphinx.ext.linkcode to provide links to github
Expand Down