Merge pull request #8755 from tk0miya/8745_KeyError_for_new_auto_footnote_refs

Fix #8745: i18n: KeyError if a new auto footnote_ref in translations
This commit is contained in:
Takeshi KOMIYA 2021-01-28 00:12:14 +09:00 committed by GitHub
commit fb4dde3fdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -83,6 +83,8 @@ Bugs fixed
* #8123: html search: fix searching for terms containing + (Requires a custom
search language that does not split on +)
* #8665: html theme: Could not override globaltoc_maxdepth in theme.conf
* #8745: i18n: crashes with KeyError when translation message adds a new auto
footnote reference
* #4304: linkcheck: Fix race condition that could lead to checking the
availability of the same URL twice
* #7118: sphinx-quickstart: questionare got Mojibake if libreadline unavailable

View File

@ -311,6 +311,7 @@ class Locale(SphinxTransform):
refname = newf.get('refname')
refs = old_foot_namerefs.get(refname, [])
if not refs:
newf.parent.remove(newf)
continue
oldf = refs.pop(0)