Module:T-TLD: Difference between revisions

// via Wikitext Extension for VSCode
// via Wikitext Extension for VSCode
 
Line 110: Line 110:
-- PROCESSORS
-- PROCESSORS
template.config.processors = template.config.processors or {}
template.config.processors = template.config.processors or {}
-- REVIEW: PIC/RVC link processor
-- PIC/RVC link processor
template.config.processors.RVC = function(value, args)
template.config.processors.RVC = function(value, args)
     local val = tostring(value)
     local val = tostring(value)
     if val:find("gtldresult.icann.org") then
     if val:match("^https://gtldresult%.icann%.org/") then
        -- Full URL provided, use it directly
         return string.format("[%s Here]", val)
         return string.format("[%s Here]", val)
     elseif val:match("^%d+$") then
     elseif val:match("^%d+$") then
        -- Only application number provided, construct the full URL
         return string.format("[https://gtldresult.icann.org/applicationstatus/applicationdetails/%s Here]", val)
         return string.format("[https://gtldresult.icann.org/applicationstatus/applicationdetails/%s Here]", val)
     end
     end