From cfddf17d350ea16e2dbea23f926ef2fc0b5e8372 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 17 Sep 2016 18:13:17 +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 a2738a30d..dd7976cf0 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: @@ -340,7 +339,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