| Dalba added a comment. |
In 3.7 re.sub(r'\\\[\\\[(\\:)?', r'\[\[\:?', re.escape('[[:Wiki markup]]')) returns '\\[\\[\\:?:Wiki\\ markup\\]\\]'. but in earlier version it returns '\\[\\[\\:?Wiki\\ markup\\]\\]'. Note the addictional : in 3.7 result.
This is probably related to re.sub change:
re.sub() now replaces empty matches adjacent to a previous non-empty match. For example re.sub('x*', '-', 'abxd') returns now '-a-b--d-' instead of '-a-b-d-' (the first minus between ‘b’ and ‘d’ replaces ‘x’, and the second minus replaces an empty string between ‘x’ and ‘d’).
TASK DETAIL
EMAIL PREFERENCES
To: Dalba
Cc: Aklapper, pywikibot-bugs-list, Dalba, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
Cc: Aklapper, pywikibot-bugs-list, Dalba, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
