ਸਮੱਗਰੀ 'ਤੇ ਜਾਓ

ਮੌਡਿਊਲ:string/replacementEscape

ਵਿਕਸ਼ਨਰੀ, ਇਕ ਅਜ਼ਾਦ ਸ਼ਬਦਕੋਸ਼ ਤੋਂ

Documentation for this module may be created at ਮੌਡਿਊਲ:string/replacementEscape/doc

local gsub = string.gsub

--[==[Escapes {%}, which is the only magic character used in replacement strings, which are given as the third argument to {string.gsub} and {mw.ustring.gsub}, as well as format strings given to {string.format} and {mw.ustring.format}.]==]
return function(str)
	return (gsub(str, "%%", "%%%%"))
end