Page MenuHomePhabricator

textlib.removeDisabledParts does not work for 'template' tag
Closed, ResolvedPublicBUG REPORT

Description

>>> import pywikibot
>>> from pywikibot import textlib
>>> text = 'slkdls {{Infobox|\nfoo=bar}}  ksjdks'
>>> textlib.removeDisabledParts(text, tags=['template'])
'slkdls {{Infobox|\nfoo=bar}}  ksjdks'
>>>

Expected result:

'slkdls   ksjdks'

Event Timeline

Xqt triaged this task as High priority.Feb 8 2021, 1:09 PM
Xqt added a project: Pywikibot-textlib.py.
Xqt changed the subtype of this task from "Task" to "Bug Report".Feb 8 2021, 1:16 PM

Change 662715 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] Fix textlib.removeDisabledParts method

https://gerrit.wikimedia.org/r/662715

Change 662715 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Fix textlib.removeDisabledParts method

https://gerrit.wikimedia.org/r/662715

JJMC89 removed a project: Patch-For-Review.