734
edits
(checking how frame.args actually works) |
(fix arity check at top of deranize()) |
||
Line 63: | Line 63: | ||
-- {{#invoke:Deranize|deranize|arg}} (TODO: turn this into a family friendly template) | -- {{#invoke:Deranize|deranize|arg}} (TODO: turn this into a family friendly template) | ||
function deranize(frame) | function deranize(frame) | ||
assert(frame.args[1] ~= nil and frame.args[2] == nil, "This function requires exactly one argument") | |||
local normalized = mw.ustring.gsub(mw.ustring.lower(frame.args[1]), "i", "ı") | local normalized = mw.ustring.gsub(mw.ustring.lower(frame.args[1]), "i", "ı") | ||
mw.log(normalized) | mw.log(normalized) |