Module:languages: Difference between revisions
No edit summary |
No edit summary |
||
| Line 965: | Line 965: | ||
first_sc = get_script(first_sc) | first_sc = get_script(first_sc) | ||
local charset = first_sc.characters | local charset = first_sc.characters | ||
if charset and charset:find("%]") then | |||
charset = "]" .. charset:gsub("%]", "") | |||
end | |||
return charset and umatch(text, "[" .. charset .. "]") and first_sc or get_script("None") | return charset and umatch(text, "[" .. charset .. "]") and first_sc or get_script("None") | ||
end | end | ||