Module:TemplateHelpers: Difference between revisions
// via Wikitext Extension for VSCode Tag: Reverted |
// via Wikitext Extension for VSCode Tag: Manual revert |
||
| Line 572: | Line 572: | ||
return TemplateStructure.renderDividerBlock(label) | return TemplateStructure.renderDividerBlock(label) | ||
end | end | ||
-- Extracts semantic value from a field, handling wiki links appropriately | -- Extracts semantic value from a field, handling wiki links appropriately | ||
| Line 610: | Line 587: | ||
if LinkParser.processWikiLink(fieldValue, "check") then | if LinkParser.processWikiLink(fieldValue, "check") then | ||
-- Use the standardized error handling helper | -- Use the standardized error handling helper | ||
return p.withErrorHandling( | return p.withErrorHandling( | ||
errorContext, | |||
"extractFromWikiLink_" .. fieldName, | |||
LinkParser.extractFromWikiLink, | |||
fieldValue, -- fallback to original value on error | |||
fieldValue | |||
) | |||
else | else | ||
-- Otherwise, | -- Otherwise, use the plain text value | ||
return | return fieldValue | ||
end | end | ||
end | end | ||