Add redirects to Misc/NEWS bpo links (GH-91454) (GH-91535)

(cherry picked from commit 17dbb6bc10)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
This commit is contained in:
Miss Islington (bot) 2022-04-14 08:02:03 -07:00 committed by GitHub
parent 52ce75fc1e
commit 35fef27110
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -433,7 +433,8 @@ class MiscNews(Directive):
text = 'The NEWS file is not available.'
node = nodes.strong(text, text)
return [node]
content = issue_re.sub(r'`bpo-\1 <https://bugs.python.org/issue\1>`__',
content = issue_re.sub(r'`bpo-\1 <https://bugs.python.org/'
r'issue?@action=redirect&bpo=\1>`__',
content)
content = whatsnew_re.sub(r'\1', content)
# remove first 3 lines as they are the main heading