Module:TemplateFieldProcessor: Difference between revisions

// via Wikitext Extension for VSCode
// via Wikitext Extension for VSCode
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
--[[
--[[
* TemplateFieldProcessor.lua
* Name: TemplateFieldProcessor
* Provides field processing functionality for ICANNWiki templates
* Author: Mark W. Datysgeld
*
* Description: Field processing functionality for templates with processor initialization, caching, and error handling
* This module handles the processing of template fields, including:
* Notes: Standard field processors for common field types; processor initialization and caching; field value retrieval; field processing with error handling; declarative list generation via field.list property; includes wiki link handling strategy
* - Standard field processors for common field types
* - Processor initialization and caching
* - Field value retrieval
* - Field processing with error handling
* - Declarative list generation via the `field.list` property
]]
]]


Line 156: Line 151:
     identity = function(value, args, template)
     identity = function(value, args, template)
         return value
         return value
    end,
   
    -- Website processor
    website = function(value, args, template)
        return TemplateHelpers.normalizeWebsites(value)
     end,
     end,
      
      
Line 179: Line 169:
         -- Default single-date formatting
         -- Default single-date formatting
         return getNormalizationDate().formatDate(value)
         return getNormalizationDate().formatDate(value)
    end,
   
    -- Language processor
    language = function(value, args, template)
        return TemplateHelpers.normalizeLanguages(value)
     end,
     end,