HomePhabricator

Add mw.text.unstripNoWiki, mw.text.killMarkers, fix mw.text.unstrip

Description

Add mw.text.unstripNoWiki, mw.text.killMarkers, fix mw.text.unstrip

mw.text.unstrip is too broad, it's allowing for unstripping things that
cause problems when unstripped (e.g. bug 61268). Since the original
request was only for unstripping <nowiki>, let's add a function that
does only that.

We should also add an interface to StripState::killMarkers(), instead of
requiring everyone to roll their own work-alike.

Then, to fix the bug, we can make mw.text.unstrip be the combination of
the two. This is the most like the original behavior of mw.text.unstrip
(removes all strip markers, replacing them with text where applicable)
without causing issues.

Bug: 61268
Change-Id: I3a151fd678b365d629b71b4f1cb0d5d284b98555
(cherry picked from commit e5564cf9420c438799f27f84da45a5cd13ce44b7)

Details

Provenance
AnomieAuthored on
MglaserCommitted on Dec 17 2014, 10:52 AM
Parents
rELUA18e738d3bbc9: Use correct variable in require()
Branches
Unknown
Tags
Unknown
ChangeId
I3a151fd678b365d629b71b4f1cb0d5d284b98555