Module:T-TLD: Difference between revisions

// via Wikitext Extension for VSCode
// via Wikitext Extension for VSCode
Line 186: Line 186:
-- ==================== Preprocessors ====================
-- ==================== Preprocessors ====================
-- Basic preprocessors
-- Basic preprocessors
Blueprint.addPreprocessor(template, function(template, args)
    if args.tld_type and args.tld_type ~= '' then
        args._type = select(1, getCanonicalForms().normalize(args.tld_type, template.config.mappings.tld_type)) or args.tld_type
    end
    return args
end)  -- Map tld_type to internal _type
Blueprint.addPreprocessor(template, detectIDNStatus)  -- IDN detection
Blueprint.addPreprocessor(template, detectIDNStatus)  -- IDN detection
Blueprint.addPreprocessor(template, 'setPageIdField')  -- Blueprint default
Blueprint.addPreprocessor(template, 'setPageIdField')  -- Blueprint default