jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1314741?usp=email )

Change subject: [bugfix] Match multiline HTML comments
......................................................................

[bugfix] Match multiline HTML comments

Bug: T432541
Change-Id: I7e7018fa32a302b41bd2c323fa362eae4f89db75
---
M pywikibot/textlib.py
1 file changed, 4 insertions(+), 1 deletion(-)

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




diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index b4fd34f..cbea438 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -2229,6 +2229,9 @@
        *patterns* is a :class:`TimeStripperPatterns` namedtuple instead
        of a list.

+    .. versionchanged:: 11.7
+       HTML comments spanning multiple lines are now recognized.
+
     **Example**:

     >>> site = pywikibot.Site('wikipedia:fr')
@@ -2293,7 +2296,7 @@
         )

         self._hyperlink_pat = re.compile(r'\[\s*?http[s]?://[^\]]*?\]')
-        self._comment_pat = re.compile(r'<!--(.*?)-->')
+        self._comment_pat = re.compile(r'<!--(.*?)-->', re.DOTALL)
         self._wikilink_pat = re.compile(
             r'\[\[(?P<link>[^\]\|]*?)(?P<anchor>\|[^\]]*)?\]\]')


--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1314741?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: I7e7018fa32a302b41bd2c323fa362eae4f89db75
Gerrit-Change-Number: 1314741
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to