mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Catch KeyError resolving numref if target docs does not included in toctree
This commit is contained in:
parent
8270575a9c
commit
e0fb54a7bb
@ -632,7 +632,7 @@ class StandardDomain(Domain):
|
|||||||
figtype = get_figtype(target)
|
figtype = get_figtype(target)
|
||||||
figure_id = target['ids'][0]
|
figure_id = target['ids'][0]
|
||||||
fignumber = env.toc_fignumbers[docname][figtype][figure_id]
|
fignumber = env.toc_fignumbers[docname][figtype][figure_id]
|
||||||
except IndexError:
|
except (KeyError, IndexError):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
title = contnode.astext()
|
title = contnode.astext()
|
||||||
|
Loading…
Reference in New Issue
Block a user