Module:StripColor: Difference between revisions
Jump to navigation
Jump to search
(jank) |
(No difference)
|
Revision as of 17:19, 28 July 2019
Documentation for this module may be created at Module:StripColor/doc
local p = {}
function p.parse(frame)
local b = string.gsub(frame.args[1],"([{}])", "")
local b = string.gsub(b,"(~J211)", "")
local b = string.gsub(b,"(~)","</br>")
local a = string.gsub(b,"(&)(%w)([^&\n]*)", function(_,color,text)
return text
end)
return a
end
function p.nonxmlparse(frame)
local a = string.gsub(frame.args[1],"(\\n)","</br>")
local b = string.gsub(a,"(&)(%w)([^&\n]*)", function(_,color,text)
return text
end)
return b
end
return p