Module:Unicode chart/sandbox: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 6:
local function unicodeChar(hex)
if unicodeLookupName(tonumber(hex, 16)):find("<reserved") then
return mw.html.create("reservedtd")
:addClass("reserved")
else
return '&#x'mw.html. hex .. ';'create("td")
:wikitext('&#x'.. hex .. ';')
end
-- return frame:expandTemplate{
Line 36 ⟶ 38:
row:tag("th"):wikitext('U+'.. rowHex .. 'x')
for colIndex=0, 15 do
row:unicodeChar(rowHex .. string.format("%X", colIndex))
row:tag("td"):wikitext(
unicodeChar(rowHex .. string.format("%X", colIndex))
)
end
end