View source for Module:Item
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
local p = {}
local function escape(str)
return str:gsub("[|\\]", function (c) return string.format("\\%03d", c:byte()) end)
end
local function unescape(str)
return str:gsub("\\(%d%d%d)", function (d) return string.char(d) end)
end
-- Implements [[Template:Item]]
function p.pack(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
000
1:0
Template used on this page:
Return to Module:Item.