Module:Documentation: Difference between revisions

use "ugsub" rather than "gsub" as the abbreviation for mw.ustring.gsub, to make it clearer that it isn't the regular string.gsub
m>Mr. Stradivarius
(oops, looks like I issued a command that put everything in lower case somewhere along the line)
m>Mr. Stradivarius
(use "ugsub" rather than "gsub" as the abbreviation for mw.ustring.gsub, to make it clearer that it isn't the regular string.gsub)
Line 12: Line 12:


-- Often-used functions.
-- Often-used functions.
local gsub = mw.ustring.gsub
local ugsub = mw.ustring.gsub


----------------------------------------------------------------------------
----------------------------------------------------------------------------
Line 44: Line 44:
end
end


local ret = gsub(msg, '$([1-9][0-9]*)', getMessageVal)
local ret = ugsub(msg, '$([1-9][0-9]*)', getMessageVal)
return ret
return ret
end
end
Anonymous user