Module:SemanticAnnotations: Difference between revisions
// via Wikitext Extension for VSCode Tag: Reverted |
// via Wikitext Extension for VSCode Tag: Manual revert |
||
| Line 229: | Line 229: | ||
if type(mapping) == "string" then | if type(mapping) == "string" then | ||
-- Simple string | -- Simple string mapping | ||
propertyCount = propertyCount + addSimplePropertyToResult(result, | propertyCount = propertyCount + addSimplePropertyToResult(result, | ||
fullPropertyName, | fullPropertyName, args[mapping], transform[property], default[property]) | ||
elseif type(mapping) == "table" then | elseif type(mapping) == "table" then | ||
if mapping.param then | if mapping.param then | ||
| Line 298: | Line 296: | ||
]] | ]] | ||
function p.setSemanticProperties(args, mappings, options) | function p.setSemanticProperties(args, mappings, options) | ||
-- | -- Fall back to parser functions if mw.smw unavailable | ||
if not mw.smw then return p.generateEnhancedAnnotations(args, mappings, options) end | |||
options = options or {} | options = options or {} | ||