Content deleted Content added
No edit summary |
No edit summary |
||
(17 intermediate revisions by the same user not shown) | |||
Line 28:
}
local
-- Block: Variation Selectors
{first = 0xFE00, last = 0xFE0F, str = "VS<br>", startNum = 1},
Line 95:
local function getCategory(codepoint)
local category = mUnicode.lookup_control(codepoint.int)
if category ~= "unassigned" then
Line 125 ⟶ 122:
---------------------
local function getCellAbbr(codepoint, category, args)
local function
for key, value in pairs(
if codepoint.int >= value.first
and codepoint.int <= value.last then
Line 135 ⟶ 132:
end
local function getAliasAbbr(codepoint)▼
local tbl = getAliasValues(codepoint.int, "abbreviation")▼
--for key, value in pairs(specialFormatSets) do
-- if codepoint.int >= value.first
Line 144 ⟶ 138:
-- end
--end
return alias▼
▲ local function getAliasAbbr(codepoint)
▲ local tbl = getAliasValues(codepoint.int, "abbreviation")
end
Line 162 ⟶ 159:
end
--exception listed at top
local abbr1 =
if abbr1 then return abbr1 end
--abbr on list
Line 182 ⟶ 179:
end
return aliasStr
local function linkChar(unicodeChar, codepoint, args)
elseif args['link'] == "wikt" then
end
end
Line 191 ⟶ 201:
end
local function abbrCell(abbr)
cell:addClass("abbr-
cell:tag("div"):addClass("abbr-box"):wikitext(abbr)
end
Line 206 ⟶ 216:
else
local unicodeChar = '&#x'.. codepoint.hex .. ';'
unicodeChar = linkChar(unicodeChar, codepoint, args) or unicodeChar
▲ if (args['link_sub'] and args['link_sub'][codepoint.int]) then
cell:addClass("modified")▼
▲ local redir = mRedirect.luaMain(unicodeChar, false)
▲ --unicodeChar = '[[' .. redir .. '|' .. unicodeChar .. ']]'
▲ unicodeChar = expandTemplate('Link if exists', {unicodeChar})
▲ elseif args['link'] == "wikt" then
▲ unicodeChar = '[[wikt:' .. unicodeChar .. '|' .. unicodeChar .. ']]'
end
if args['wrapper'] then
Line 220 ⟶ 226:
elseif args['font'] then
cell:css("font-family", "'" .. args['font'] .. "'")
--unicodeChar = tostring(
▲ end
-- mw.html.create("div")
-- :css("font-family", "'" .. args['font'] .. "'")
▲ unicodeChar = unicodeChar
-- :wikitext(unicodeChar)
▲ .. '&#x' .. args['suffix'][codepoint.int] .. ';'
--)
▲ cell:addClass("modified")
end
cell:wikitext(unicodeChar)
Line 257 ⟶ 263:
local row = body:tag("tr")
row:tag("th"):wikitext("U+".. rowHex .. "<i>x</i>")
:attr("rowspan", "2")
for colIndex=0, 15 do
local cell = row:tag("td")
--rowHex .. string.format("%X", colIndex)
createCell(cell,
newCodepoint(
args
)
end
local subrow = body:tag("tr")
for colIndex=0, 15 do
subrow:tag("td"):addClass("codepoint")
:wikitext(string.format("%04X", rowIndex*16 + colIndex))
end
end
Line 344 ⟶ 357:
end
end
-- look up block by na,e
if args['blockname'] then
local range = mUnicode.get_block_info(args['blockname'])
Line 354 ⟶ 369:
args
)
-- block given as start and end of range
elseif args['rangestart'] and args['rangeend'] then
return createTable(
|