Content deleted Content added
No edit summary |
No edit summary |
||
Line 135:
end
local function getAliasAbbr(codepoint)▼
local tbl = getAliasValues(codepoint.int, "abbreviation")▼
local alias = tbl[1] or nil -- last one▼
--for key, value in pairs(specialFormatSets) do
-- if codepoint.int >= value.first
Line 144 ⟶ 141:
-- end
--end
▲ local function getAliasAbbr(codepoint)
▲ local tbl = getAliasValues(codepoint.int, "abbreviation")
return alias
end
Line 182 ⟶ 183:
end
return aliasStr
end
local function linkChar(unicodeChar, codepoint, args)
return '[[' .. args['link_sub'][codepoint.int]
.. '|' .. unicodeChar .. ']]'
-- '[[' .. redir .. '|' .. unicodeChar .. ']]'
return expandTemplate('Link if exists', {unicodeChar})
return '[[wikt:' .. unicodeChar .. '|' .. unicodeChar .. ']]'
end
end
Line 206 ⟶ 220:
else
local unicodeChar = '&#x'.. codepoint.hex .. ';'
unicodeChar = linkChar(unicodeChar, codepoint, args) or unicodeChar
▲ if (args['link_sub'] and args['link_sub'][codepoint.int]) then
--
--
-- .. '|' .. unicodeChar .. ']]'
▲ elseif args['link'] == "wiki" then
-- elseif args['link'] == "wiki" then
▲ local redir = mRedirect.luaMain(unicodeChar, false)
--
-- --unicodeChar =
-- unicodeChar = expandTemplate('Link if exists', {unicodeChar})
▲ elseif args['link'] == "wikt" then
-- elseif args['link'] == "wikt" then
-- unicodeChar = '[[wikt:' .. unicodeChar .. '|' .. unicodeChar .. ']]' -- end
if args['wrapper'] then
unicodeChar = expandTemplate(args['wrapper'], {unicodeChar})
|