mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix figure nodes do not known lineno itself
This commit is contained in:
parent
11d8b64ae4
commit
6ea833280d
@ -28,6 +28,10 @@ class Figure(images.Figure):
|
||||
self.options['name'] = name
|
||||
self.add_name(figure_node)
|
||||
|
||||
# fill lineno using image node
|
||||
if figure_node.line is None and len(figure_node) == 2:
|
||||
figure_node.line = figure_node[1].line
|
||||
|
||||
return [figure_node]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user