Module:Sandbox/Erutuon: Difference between revisions

Content deleted Content added
nicer version of list
Undid revision 848709251 by Erutuon (talk)
Line 183:
local output = Output()
local start = frame.args[1] and tonumber(frame.args[1], 16) or 0
local ending = 0x20000 or frame.args[2] and tonumber(frame.args[2], 16) or 0x4000
local script_data = mw.loadData "Module:Unicode data/scripts"
Line 237:
! block !! codepoints !! scripts
]]
local blocks_containing_Latn = {}
for _, block in pairs(mw.loadData "Module:Unicode data/blocks") do
Line 252 ⟶ 250:
codepoints_per_script:add(script, codepoint)
codepoint = codepoint + 1
count = 1 -- for potential future use
else
local range, index = Unicode_data.binary_range_search(codepoint, ranges)
Line 281 ⟶ 279:
end
end
end
if codepoints_per_script.Latn then
mw.log(('* %s (U+%04X-U+%04X): <span title="%s">%d</span>%s')
:format(block[3], block[1], block[2],
mw.text.nowiki(mw.ustring.char(
unpack(codepoints_per_script.Latn))),
counts.Latn,
block[2] - block[1] + 1 == counts.Latn and " (all)"
or ""))
end