mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #6718: i18n: KeyError is raised if section title and table title are same
This commit is contained in:
parent
2d609ddf58
commit
d0b1083593
1
CHANGES
1
CHANGES
@ -29,6 +29,7 @@ Bugs fixed
|
||||
* #6704: linkcheck: Be defensive and handle newly defined HTTP error code
|
||||
* #6655: image URLs containing ``data:`` causes gettext builder crashed
|
||||
* #6584: i18n: Error when compiling message catalogs on Hindi
|
||||
* #6718: i18n: KeyError is raised if section title and table title are same
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -134,7 +134,7 @@ class Locale(SphinxTransform):
|
||||
processed = False # skip flag
|
||||
|
||||
# update title(section) target name-id mapping
|
||||
if isinstance(node, nodes.title):
|
||||
if isinstance(node, nodes.title) and isinstance(node.parent, nodes.section):
|
||||
section_node = node.parent
|
||||
new_name = nodes.fully_normalize_name(patch.astext())
|
||||
old_name = nodes.fully_normalize_name(node.astext())
|
||||
|
Loading…
Reference in New Issue
Block a user