Module:ElementTLDFlair: Difference between revisions
// via Wikitext Extension for VSCode |
// via Wikitext Extension for VSCode |
||
| Line 9: | Line 9: | ||
p.elementName = "tldflair" | p.elementName = "tldflair" | ||
local ErrorHandling = require('Module:ErrorHandling') | local ErrorHandling = require('Module:ErrorHandling') | ||
local CanonicalForms = require('Module:CanonicalForms') | |||
-- Create a badge block for TLD styling | -- Create a badge block for TLD styling | ||
| Line 39: | Line 40: | ||
local classes = { "tld-flair" } | local classes = { "tld-flair" } | ||
if subtype ~= "" then | if subtype ~= "" then | ||
local | local _, _, css = CanonicalForms.normalize(subtype, template.config.mappings.tld_subtype) | ||
table.insert(classes, | if css then | ||
table.insert(classes, css) | |||
end | |||
end | end | ||
if isIDN then | if isIDN then | ||