Module:SemanticAnnotations: Difference between revisions
// via Wikitext Extension for VSCode Tag: Reverted |
// via Wikitext Extension for VSCode Tag: Reverted |
||
| Line 296: | Line 296: | ||
]] | ]] | ||
function p.setSemanticProperties(args, mappings, options) | function p.setSemanticProperties(args, mappings, options) | ||
-- DEBUG: | -- DEBUG: dump semantic property values for troubleshooting | ||
if | do | ||
local debugLines = {} | |||
table.insert(debugLines, '<!-- DEBUG semantic properties:') | |||
for prop, val in pairs(mappings) do | |||
if type(val) == 'table' then | |||
for _, v in ipairs(val) do | |||
table.insert(debugLines, string.format('DEBUG: %s = %s', prop, tostring(v))) | |||
end | |||
else | |||
table.insert(debugLines, string.format('DEBUG: %s = %s', prop, tostring(val))) | |||
end | |||
end | |||
table.insert(debugLines, '-->') | |||
return table.concat(debugLines, '\n') | |||
end | |||
options = options or {} | options = options or {} | ||