jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1288690?usp=email )
Change subject: [bugfix] Fix unbalanced bracket in linksInRef of reflinks script
......................................................................
[bugfix] Fix unbalanced bracket in linksInRef of reflinks script
Also simplify URL scheme regex using optional quantifier
Bug: T426607
Change-Id: Ia79dfd5f9cb53cc84321a4e611024c158a5c5abd
---
M scripts/reflinks.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
jenkins-bot: Verified
Matěj Suchánek: Looks good to me, approved
diff --git a/scripts/reflinks.py b/scripts/reflinks.py
index eeb1d79..99f9344 100755
--- a/scripts/reflinks.py
+++ b/scripts/reflinks.py
@@ -192,9 +192,9 @@
# Regex that match bare references
linksInRef = re.compile(
# bracketed URLs
- r'(?i)<ref(?P<name>[^>]*)>\s*\[?(?P<url>(?:http|https)://(?:'
+ r'(?i)<ref(?P<name>[^>]*)>\s*\[?(?P<url>https?://(?:'
# unbracketed with()
- r'^\[\]\s<>"]+\([^\[\]\s<>"]+[^\[\]\s\.:;\\,<>\?"]+|'
+ r'[^\[\]\s<>"]+\([^\[\]\s<>"]+[^\[\]\s\.:;\\,<>\?"]+|'
# unbracketed without ()
r'[^\[\]\s<>"]+[^\[\]\s\)\.:;\\,<>\?"]+|[^\[\]\s<>"]+))'
r'[!?,\s]*\]?\s*</ref>')
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1288690?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ia79dfd5f9cb53cc84321a4e611024c158a5c5abd
Gerrit-Change-Number: 1288690
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-CC: Thiemo Kreuz (WMDE) <[email protected]>
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]