Module:Deranize: Difference between revisions

m
discard gsub count
m (add clean function)
m (discard gsub count)
Line 137: Line 137:
function clean(frame)
function clean(frame)
   assert(frame.args[1] ~= nil and frame.args[2] == nil, "This function requires exactly one argument")
   assert(frame.args[1] ~= nil and frame.args[2] == nil, "This function requires exactly one argument")
   return u.gsub(frame.args[1], "[%[%]*]", "")
   local cleaned = u.gsub(frame.args[1], "[%[%]*]", "")
  return cleaned
end
end


return {deranize = deranize, clean = clean}
return {deranize = deranize, clean = clean}