Module:Param Parse: Difference between revisions
Make sure name doesn't include variant when it's set to N/A
(if variant is N/A, prevent writing to SMW since the SMW parameter is of datatype page) |
(Make sure name doesn't include variant when it's set to N/A) |
||
Line 447:
end
function parse.variant_category_func(v)
v = parse.has_content(v)
if v == nil then
return nil
Line 467 ⟶ 468:
end
local function name_without_variant_category(name, variant_name)
if variant_name and name:sub(-1-#variant_name) == ' '..variant_name then
-- Ends with the variant name. Remove it
name = name:sub(1, -2-#variant_name)
Line 474 ⟶ 476:
end
local function name_with_variant_category(name, v, passive, is_for_smw)
v = parse.variant_smw_func(v)
if v == nil then
return name
|