Module talk:Unstrip

Edit request

{{Edit template-protected|answered=yes}}

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 {{tlc|killMarkers}}), and I have investigated the uses of {{tlc|killMarkers}} (see this [https://en.wikipedia.org/w/index.php?search=insource%3AkillMarkers+insource%3A%2F%5C%7B+%2AKillMarkers%2F&title=Special:Search&profile=advanced&fulltext=1&ns0=1&ns1=1&ns2=1&ns3=1&ns4=1&ns5=1&ns6=1&ns7=1&ns8=1&ns9=1&ns10=1&ns11=1&ns12=1&ns13=1&ns14=1&ns15=1&ns100=1&ns101=1&ns118=1&ns119=1&ns710=1&ns711=1&ns828=1&ns829=1&ns2300=1&ns2301=1&ns2302=1&ns2303=1 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 [https://en.wikipedia.org/w/index.php?search=insource%3Ainvoke+insource%3Aunstrip+insource%3A%2Finvoke+%2A%5C%3A+%2Aunstrip%2Fi&title=Special:Search&profile=advanced&fulltext=1&ns0=1&ns1=1&ns2=1&ns3=1&ns4=1&ns5=1&ns6=1&ns7=1&ns8=1&ns9=1&ns10=1&ns11=1&ns12=1&ns13=1&ns14=1&ns15=1&ns100=1&ns101=1&ns118=1&ns119=1&ns710=1&ns711=1&ns828=1&ns829=1&ns2300=1&ns2301=1&ns2302=1&ns2303=1 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)

: {{done}} * Pppery * it has begun... 01:12, 8 October 2021 (UTC)