Jump to content

Module:Unstrip: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
Per edit request
 
Line 1: Line 1:
-- This module provides a frontend to the mw.text.unstrip and unstripNoWiki functions
-- This module provides a frontend to the mw.text.unstrip, unstripNoWiki and killMarkers functions
local p = {}
local p = {}


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


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

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

return p
return p

Latest revision as of 01:12, 8 October 2021

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