Jump to content

Module:Unstrip

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Pppery (talk | contribs) at 23:36, 25 May 2019 (Merging in Module:KillMarkers per TfD). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

-- This module provides a frontend to the mw.text.unstrip and unstripNoWiki functions
local p = {}

function p.unstrip(frame)
	return mw.text.unstrip(frame.args[1] or '')
end

function p.unstripNoWiki(frame)
	return mw.text.unstripNoWiki(frame.args[1] or '')
end
function p.killMarkers(frame)
	local text = frame.args[1]
	text = mw.text.killMarkers(text)
		:gsub("^%s+", "") --strip leading
		:gsub("%s+$", "") --and trailing spaces
end
return p