Module:T-LibraryInterview: Difference between revisions

// via Wikitext Extension for VSCode
// via Wikitext Extension for VSCode
Line 111: Line 111:
-- Add preprocessor for semantic property extraction
-- Add preprocessor for semantic property extraction
Blueprint.addPreprocessor(template, function(template, args)
Blueprint.addPreprocessor(template, function(template, args)
     -- Extract names from wiki links for semantic properties
     -- Store the plain text version for semantic properties
     if args.Interviewee and args.Interviewee ~= "" then
     if args.Interviewee and args.Interviewee ~= "" then
         args._semanticInterviewee = ErrorHandling.protect(
         args._semanticInterviewee = args.Interviewee
            errorContext,
            "extractFromWikiLink_Interviewee",
            extractFromWikiLink,
            args.Interviewee,  -- fallback to original value on error
            args.Interviewee
        )
     end
     end
      
      
     if args.Interviewer and args.Interviewer ~= "" then
     if args.Interviewer and args.Interviewer ~= "" then
         args._semanticInterviewer = ErrorHandling.protect(
         args._semanticInterviewer = args.Interviewer
            errorContext,
            "extractFromWikiLink_Interviewer",
            extractFromWikiLink,
            args.Interviewer,  -- fallback to original value on error
            args.Interviewer
        )
     end
     end