Module:Item: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Petr Matas (←Created page with 'local p = {} function escape(str) return str:gsub("([|\\])", "\\%1") end function p.main(frame) local parent = frame:getParent() local result = '' for ke...') |
meta>Petr Matas No edit summary |
||
Line 10: | Line 10: | ||
local result = '' | local result = '' | ||
for key, value in pairs(parent.args) do | for key, value in pairs(parent.args) do | ||
result = result .. "|" .. escape(key) .. "|" .. escape(value) | result = result .. "|" .. escape(tostring(key)) .. "|" .. escape(value) | ||
end | end | ||
Revision as of 02:40, 13 December 2015
Documentation for this module may be created at Module:Item/doc
local p = {} function escape(str) return str:gsub("([|\\])", "\\%1") end function p.main(frame) local parent = frame:getParent() local result = '' for key, value in pairs(parent.args) do result = result .. "|" .. escape(tostring(key)) .. "|" .. escape(value) end return result; end return p