jenkins-bot has submitted this change and it was merged.
Change subject: Prevent <references.../> from being destroyed ......................................................................
Prevent <references.../> from being destroyed
Use raw string tag to prevent \1 from being treated as chr(1)
Bug: T123104 Change-Id: I89dbf5bbf5f5bcde67247bb44177671e3dde2f0c --- M scripts/noreferences.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/noreferences.py b/scripts/noreferences.py index e2d793d..7f49df5 100755 --- a/scripts/noreferences.py +++ b/scripts/noreferences.py @@ -529,7 +529,7 @@ r'< */?\s*references */? *>', re.DOTALL) if pattern.search(oldText): pywikibot.output('Repairing references tag') - return re.sub(pattern, '<references>\1</references>', oldText) + return re.sub(pattern, r'<references>\1</references>', oldText) # Repair single unclosed references tag pattern = re.compile(r'< *references *>') if pattern.search(oldText):
pywikibot-commits@lists.wikimedia.org