mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
fix: Duplicated section name will cause crash. refs #1193
This commit is contained in:
parent
9bd30c748e
commit
430d0e9895
@ -213,9 +213,10 @@ class Locale(Transform):
|
||||
if old_name in names:
|
||||
names.remove(old_name)
|
||||
|
||||
id = self.document.nameids.pop(old_name)
|
||||
_id = self.document.nameids.pop(old_name, None)
|
||||
_type = self.document.nametypes.pop(old_name, None)
|
||||
self.document.set_name_id_map(
|
||||
section_node, id, section_node, explicit=None)
|
||||
section_node, _id, section_node, explicit=_type)
|
||||
|
||||
# auto-numbered foot note reference should use original 'ids'.
|
||||
def is_autonumber_footnote_ref(node):
|
||||
|
Loading…
Reference in New Issue
Block a user