Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Module talk:Unstrip

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
(Redirected from Module talk:Unstrip/doc)
Latest comment: 4 years ago by Pppery in topic Edit request

Edit request

[edit]

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)Reply

 Done * Pppery * it has begun... 01:12, 8 October 2021 (UTC)Reply