Module:SemanticAnnotations: Difference between revisions
// via Wikitext Extension for VSCode Tags: Manual revert Reverted |
Tags: Undo Reverted |
||
| Line 3: | Line 3: | ||
local p = {} | local p = {} | ||
local NormalizationText = require('Module:NormalizationText') | local NormalizationText = require('Module:NormalizationText') | ||
| Line 50: | Line 49: | ||
if type(param) == "string" then | if type(param) == "string" then | ||
local fullPropertyName = prefix .. property | local fullPropertyName = prefix .. property | ||
local | local value = args[param] | ||
-- Apply transform if needed | -- Apply transform if needed | ||
| Line 69: | Line 68: | ||
for property, condition in pairs(conditional) do | for property, condition in pairs(conditional) do | ||
local fullPropertyName = prefix .. property | local fullPropertyName = prefix .. property | ||
if args[condition.param] and args[condition.param] == condition.value then | |||
table.insert(result, string.format(' |%s=%s', fullPropertyName, condition.target or "true")) | table.insert(result, string.format(' |%s=%s', fullPropertyName, condition.target or "true")) | ||
propertyCount = propertyCount + 1 | propertyCount = propertyCount + 1 | ||