View source for Module:Sortkey
From The Goon Show Depository
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
local getArgs = require('Module:Arguments').getArgs
local p = {}
function p._encode(sortkey)
-- Protect against sortkey nesting.
-- Example: {{sort|{{dts|2013|07|07}}|{{dts|1990|12|01}}}}
if string.find(sortkey, "sortkey") or string.find(sortkey, "data-sort-value") then
return "";
end
return mw.text.encode(sortkey)
end
function p.encode(frame)
local args = getArgs(frame);
return p._encode(args[1] or "")
end
local function valid_number(num)
-- Return true if num is a valid number.
000
1:0
Template used on this page:
Return to Module:Sortkey.