Module:Param Parse: Difference between revisions

Allow overriding the variant name seperation logic
(Fix smw when variant has a different name than the page (e.g., for disambiguating parentheses))
(Allow overriding the variant name seperation logic)
Line 478:
return tostring(result)
end
function parse.name_with_variant_category_func(name, v, passive, name_override)
return name_override or name_with_variant_category(name, v, passive, false)
end
function parse.name_with_variant_category_smw_func(name, v, passive, name_override)
return name_override or name_with_variant_category(name, v, passive, true)
end
function parse.name_without_variant_category_func(name, v)
Line 502:
parse.name_with_variant_category = {
name = 'name',
func = {name=parse.name_with_variant_category_func, params = {Infobox.raw_param('name'), Infobox.raw_param('variant'), Infobox.raw_param('passive'), Infobox.raw_param('name_override')}},
smw_func = {name=parse.name_with_variant_category_smw_func, params = {Infobox.raw_param('name'), Infobox.raw_param('variant'), Infobox.raw_param('passive'), Infobox.raw_param('name_override')}},
smw_property = 'Name',
category_incomplete = 'Needs name'
1,525

edits