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:
1
CHANGES
1
CHANGES
@@ -31,6 +31,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
|
||||
* #6708: mathbase: Some deprecated functions have removed
|
||||
* #6709: autodoc: mock object does not work as a class decorator
|
||||
* #6712: Allow not to install sphinx.testing as runtime (mainly for ALT Linux)
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user