48,355
edits
No edit summary |
No edit summary |
||
| Line 808: | Line 808: | ||
-- Remove all formatting characters. | -- Remove all formatting characters. | ||
text = get_plaintext(text) | text = get_plaintext(text) | ||
-- Try to match every script against the text, | -- Try to match every script against the text, | ||
| Line 860: | Line 854: | ||
local count = charset and length - ulen(ugsub(text, "[" .. charset .. "]+", "")) or 0 | local count = charset and length - ulen(ugsub(text, "[" .. charset .. "]+", "")) or 0 | ||
if | if match(text, "[" .. charset .. "]+") then | ||
return sc | return sc | ||
end | end | ||
end | end | ||