Module:SemanticAnnotations: Difference between revisions
// via Wikitext Extension for VSCode Tag: Reverted |
// via Wikitext Extension for VSCode Tag: Reverted |
||
| Line 229: | Line 229: | ||
if type(mapping) == "string" then | if type(mapping) == "string" then | ||
-- Simple string mapping | -- Simple string mapping: treat mapping as parameter name or literal value | ||
local rawValue = args[mapping] | |||
local val = (rawValue and rawValue ~= "") and rawValue or mapping | |||
propertyCount = propertyCount + addSimplePropertyToResult(result, | propertyCount = propertyCount + addSimplePropertyToResult(result, | ||
fullPropertyName, | fullPropertyName, val, transform[property], default[property]) | ||
elseif type(mapping) == "table" then | elseif type(mapping) == "table" then | ||
if mapping.param then | if mapping.param then | ||