Module:Sandbox/Erutuon: Difference between revisions

Content deleted Content added
examining latn pattern from Module:Lang
 
fix
Line 1:
local p = {}
 
local Unicode_data = require 'Module:Unicode data'
 
local Latn_pattern = table.concat {
Line 20 ⟶ 22:
};
 
local get_codepoint = mw.ustring.codepoint
local function expand_range(start, ending)
local lower, higher = get_codepoint(start), get_codepoint(ending)
Line 68 ⟶ 71:
 
function p.show(frame)
local expanded_pattern = Latn_pattern
:gsub('%[(.-)%]', '%1')
:gsub(
'([%z\1-\127\194-\244][\128-\191]*)%-([%z\1-\127\194-\244][\128-\191]*)',
function (char1, char2)
return expand_range(codepoint1char1, codepoint2char2)
local codepoint1, codepoint2 =
end)
mw.ustring.codepoint(char1), mw.ustring.codepoint(char2)
:gsub('^%s*', '')
return expand_range(codepoint1, codepoint2)
end)
return ('* <div style="overflow-wrap: break-word;">%s</div><br>%s"'):format(expanded_pattern, show_scripts(expanded_pattern))
end