Module:T-LibraryInterview: Difference between revisions
// via Wikitext Extension for VSCode |
// via Wikitext Extension for VSCode |
||
| Line 68: | Line 68: | ||
-- Add preprocessor for semantic property extraction | -- Add preprocessor for semantic property extraction | ||
Blueprint.addPreprocessor(template, function(template, args) | Blueprint.addPreprocessor(template, function(template, args) | ||
-- Load TemplateHelpers module | |||
local TemplateHelpers = require('Module:TemplateHelpers') | |||
-- Extract names from wiki links for semantic properties | -- Extract names from wiki links for semantic properties | ||
if args.Interviewee and args.Interviewee ~= "" then | if args.Interviewee and args.Interviewee ~= "" then | ||
| Line 75: | Line 78: | ||
errorContext, | errorContext, | ||
"extractFromWikiLink_Interviewee", | "extractFromWikiLink_Interviewee", | ||
extractFromWikiLink, | TemplateHelpers.extractFromWikiLink, | ||
args.Interviewee, -- fallback to original value on error | args.Interviewee, -- fallback to original value on error | ||
args.Interviewee | args.Interviewee | ||
| Line 91: | Line 94: | ||
errorContext, | errorContext, | ||
"extractFromWikiLink_Interviewer", | "extractFromWikiLink_Interviewer", | ||
extractFromWikiLink, | TemplateHelpers.extractFromWikiLink, | ||
args.Interviewer, -- fallback to original value on error | args.Interviewer, -- fallback to original value on error | ||
args.Interviewer | args.Interviewer | ||