mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Fix #2483: any figure number was not assigned if figure title contains only non text objects
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user