Module talk:Unstrip
(Redirected from Template talk:KillMarkers)
Latest comment: 3 years ago by Pppery in topic Edit request
Edit request
editThis edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Hello, could a sysop apply the following changes to the template please?
killMarkers()
: remove the trim. This way the module will be only a wrapper to these mw.text.* methods, allowing to use them in templates. Uniform code, single-purpose, no additional effects. The editors could add a trim in the calling code iif required. I have checked the current uses: the module function is never used directly (except of course by{{killMarkers}}
), and I have investigated the uses of{{killMarkers}}
(see this search), removing the trim will make no change.- remove the
or ''
fallbacks for parameters: they are useless, because the module functions are always invoked with a parameter so it's always defined (see this search).
The resulting code would be:
-- This module provides a frontend to the mw.text.unstrip, unstripNoWiki and killMarkers functions
local p = {}
function p.unstrip(frame)
return mw.text.unstrip(frame.args[1])
end
function p.unstripNoWiki(frame)
return mw.text.unstripNoWiki(frame.args[1])
end
function p.killMarkers(frame)
return mw.text.killMarkers(frame.args[1])
end
return p
Thanks, Od1n (talk) 12:48, 7 October 2021 (UTC)