jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/528114 )

Change subject: [bugfix] Make sure that header regex doesn't span multiple lines
......................................................................

[bugfix] Make sure that header regex doesn't span multiple lines

The regex for removeDisabledParts is compiled with dotall (singleline)
flag. This made the dot match across lines and remove the content between
the first and last headline.

Change-Id: Ia9151ca97fbf8c5b98aeb952324ed6e03473b94c
---
M pywikibot/textlib.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index 990d40c..b921002 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -267,7 +267,7 @@
         # section headers
         'header': re.compile(
             r'(?:(?<=\n)|\A)(?:<!--[\s\S]*?-->)*'
-            r'=(?:.|<!--[\s\S]*?-->)+='
+            r'=(?:[^\n]|<!--[\s\S]*?-->)+='
             r' *(?:<!--[\s\S]*?--> *)*(?=\n|\Z)'),
         # external links
         'hyperlink': compileLinkR(),

--
To view, visit https://gerrit.wikimedia.org/r/528114
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia9151ca97fbf8c5b98aeb952324ed6e03473b94c
Gerrit-Change-Number: 528114
Gerrit-PatchSet: 1
Gerrit-Owner: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: Dalba <[email protected]>
Gerrit-Reviewer: Dvorapa <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to