Module talk:Unstrip
Edit request
![]() | It is requested that an edit be made to the template-protected module at Module:Unstrip. (edit · history · last · links · transclusion count · protection log) This template must be followed by a complete and specific description of the request, so that an editor unfamiliar with the subject matter could complete the requested edit immediately.
Edit requests to template-protected pages should only be used for edits that are either uncontroversial or supported by consensus. If the proposed edit might be controversial, discuss it on the protected page's talk page before using this template. To request that a page be protected or unprotected, make a protection request. When the request has been completed or denied, please add the |
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)