Module:T-TLD: Difference between revisions

// via Wikitext Extension for VSCode
Tag: Reverted
// via Wikitext Extension for VSCode
Tag: Manual revert
Line 163: Line 163:
Blueprint.addPreprocessor(template, mapTldTypeToInternalType) -- TLD type detection
Blueprint.addPreprocessor(template, mapTldTypeToInternalType) -- TLD type detection
Blueprint.addPreprocessor(template, detectIDNStatus) -- IDN detection
Blueprint.addPreprocessor(template, detectIDNStatus) -- IDN detection
Blueprint.addPreprocessor(template, function(template, args)
    local cf = require('Module:CanonicalForms')
    local canonical = select(1, cf.normalize(args.tld_subtype or '', template.config.mappings.tld_subtype))
    if canonical then args.tld_subtype = canonical end
    return args
end)


-- ==================== Main Render Function ====================
-- ==================== Main Render Function ====================