diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-10-20 02:16:38 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-20 02:16:38 +0900 |
| commit | b9825a2c3e531a54b381655653894113b384e2ed (patch) | |
| tree | de185938f933290e8bc7c12d1d72a8109e99401e /sphinx/transforms | |
| parent | 618cc26c6463b1ad29a1568bfd123b016fc870c4 (diff) | |
| parent | d0b1083593fc61ec333588d36f1510c4e605bc69 (diff) | |
| download | sphinx-git-b9825a2c3e531a54b381655653894113b384e2ed.tar.gz | |
Merge pull request #6731 from tk0miya/6718_KeyError_for_same_titles
Fix #6718: i18n: KeyError is raised if section title and table title are same
Diffstat (limited to 'sphinx/transforms')
| -rw-r--r-- | sphinx/transforms/i18n.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/transforms/i18n.py b/sphinx/transforms/i18n.py index d970670a1..8435d4b7a 100644 --- a/sphinx/transforms/i18n.py +++ b/sphinx/transforms/i18n.py @@ -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()) |
