Fix #2483: any figure number was not assigned if figure title contains only non text objects

This commit is contained in:
Takeshi KOMIYA
2016-05-01 07:30:32 +09:00
parent 6ea833280d
commit 7ebe5704be
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -47,6 +47,7 @@ Bugs fixed
* #1534: Word wrap long lines in Latex verbatim blocks
* #2460: too much white space on top of captioned literal blocks in PDF output
* Show error reason when multiple math extensions are loaded (ref: #2499)
* #2483: any figure number was not assigned if figure title contains only non text objects
Release 1.4.1 (released Apr 12, 2016)
+1 -1
View File
@@ -548,7 +548,7 @@ class StandardDomain(Domain):
sectname = clean_astext(node[0]) # node[0] == title node
elif self.is_enumerable_node(node):
sectname = self.get_numfig_title(node)
if sectname is None:
if not sectname:
continue
elif node.traverse(addnodes.toctree):
n = node.traverse(addnodes.toctree)[0]
+1 -1
View File
@@ -114,7 +114,7 @@ class AutoNumbering(Transform):
domain = self.document.settings.env.domains['std']
for node in self.document.traverse(nodes.Element):
if domain.is_enumerable_node(node) and domain.get_numfig_title(node):
if domain.is_enumerable_node(node) and domain.get_numfig_title(node) is not None:
self.document.note_implicit_target(node)