From 82c153ffd2965fd56f1e51fd4b960014c5e4621b Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 17 Sep 2016 18:28:55 +0900 Subject: Fix #2931: code-block directive with same :caption: causes warning of duplicate target --- sphinx/directives/code.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'sphinx/directives/code.py') diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py index 8edfd61d7..35439ae39 100644 --- a/sphinx/directives/code.py +++ b/sphinx/directives/code.py @@ -133,7 +133,6 @@ class CodeBlock(Directive): caption = self.options.get('caption') if caption: - self.options.setdefault('name', nodes.fully_normalize_name(caption)) try: literal = container_wrapper(self, literal, caption) except ValueError as exc: @@ -344,7 +343,6 @@ class LiteralInclude(Directive): if caption is not None: if not caption: caption = self.arguments[0] - self.options.setdefault('name', nodes.fully_normalize_name(caption)) try: retnode = container_wrapper(self, retnode, caption) except ValueError as exc: -- cgit v1.2.1