diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-07-28 11:23:10 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-07-28 11:23:10 +0900 |
commit | 84baf05c4f9c3ff3f17779fe522cec7aa444b2f8 (patch) | |
tree | fd448879a9ca8761a68247a4a78ed826261df233 /sphinx/directives/code.py | |
parent | 54247c96fea3d6ecc74b767ca644a563a5edf335 (diff) | |
download | sphinx-git-84baf05c4f9c3ff3f17779fe522cec7aa444b2f8.tar.gz |
Closes #2799: Sphinx installs roles and directives automatically on importing sphinx module.
Now Sphinx installs them on running application.
Diffstat (limited to 'sphinx/directives/code.py')
-rw-r--r-- | sphinx/directives/code.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py index de804f988..f88b30987 100644 --- a/sphinx/directives/code.py +++ b/sphinx/directives/code.py @@ -342,8 +342,9 @@ class LiteralInclude(Directive): return [retnode] -directives.register_directive('highlight', Highlight) -directives.register_directive('highlightlang', Highlight) # old -directives.register_directive('code-block', CodeBlock) -directives.register_directive('sourcecode', CodeBlock) -directives.register_directive('literalinclude', LiteralInclude) +def setup(app): + directives.register_directive('highlight', Highlight) + directives.register_directive('highlightlang', Highlight) # old + directives.register_directive('code-block', CodeBlock) + directives.register_directive('sourcecode', CodeBlock) + directives.register_directive('literalinclude', LiteralInclude) |