From c41aed5d076f4e03c8683a75573d3ac2560a56c4 Mon Sep 17 00:00:00 2001 From: shimizukawa Date: Sun, 15 Jan 2017 11:42:18 +0900 Subject: [PATCH] Update special support nodes for gettext processing. --- sphinx/util/nodes.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py index 463d7a32e..ee4d0d223 100644 --- a/sphinx/util/nodes.py +++ b/sphinx/util/nodes.py @@ -62,17 +62,13 @@ def apply_source_workaround(node): if node.source and node.rawsource: return - # workaround: docutils-0.10.0 or older's nodes.caption for nodes.figure - # and nodes.title for nodes.admonition doesn't have source, line. - # this issue was filed to Docutils tracker: - # sf.net/tracker/?func=detail&aid=3599485&group_id=38414&atid=422032 - # sourceforge.net/p/docutils/patches/108/ + # workaround: some docutils nodes doesn't have source, line. if (isinstance(node, ( - nodes.caption, - nodes.title, - nodes.rubric, - nodes.line, - nodes.image, + nodes.caption, # figure caption: sf.net/p/docutils/patches/100/ fixed@du11 + nodes.title, # admonition title: sf.net/p/docutils/patches/108/ fixed@du11 + nodes.rubric, # #1305 rubric directive + nodes.line, # #1477 line node + nodes.image, # #3093 image directive in substitution ))): node.source = find_source_node(node) node.line = 0 # need fix docutils to get `node.line`