Module:Sandbox/Erutuon: Difference between revisions

Content deleted Content added
attempt to find Greek character
log characters belonging to each script
Line 79:
end)
local script_to_char_set = {}
mw.log( -- Find Grek character and log it.
for char in expanded_pattern:gmatch "[%z\1-\127\194-\244][\128-\191]*", do
returnlocal script = Unicode_data.lookup_script(get_codepoint(char)) == "Grek"
script_to_char_set[script] = script_to_char_set[script] or {}
script_to_char_set[script][char] = true
end
mw.log(
table.concat(
fun.filtermapIter(
function (charchar_set, script)
local char_list = m_table.keysToList(char_set)
return Unicode_data.lookup_script(get_codepoint(char)) == "Grek"
return ("U+%04Xs: %s"):format(get_codepointscript, table.concat(charchar_list))
end,
m_table.sortedPairs(script_to_char_set)),
expanded_pattern))
:gsub( '\n'))
"[%z\1-\127\194-\244][\128-\191]*",
function (char)
return ("U+%04X"):format(get_codepoint(char))
end))
return ('* <div style="overflow-wrap: break-word;">%s</div><br>%s')