Skip to content

Commit

Permalink
Make docutils' "code" directive behave like Sphinx's "code-block"
Browse files Browse the repository at this point in the history
Closes #28.
  • Loading branch information
mgeier committed Mar 6, 2016
1 parent 645258c commit 10501bd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nbsphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,4 +842,9 @@ def setup(app):
app.connect('html-collect-pages', html_collect_pages)
app.connect('env-purge-doc', env_purge_doc)

# Make docutils' "code" directive (generated by markdown2rst/pandoc)
# behave like Sphinx's "code-block",
# see https://github.com/sphinx-doc/sphinx/issues/2155:
rst.directives.register_directive('code', sphinx.directives.code.CodeBlock)

return {'version': __version__, 'parallel_read_safe': True}

0 comments on commit 10501bd

Please sign in to comment.