45,647
edits
No edit summary Tag: Reverted |
Tags: Undo Reverted |
||
Line 357: | Line 357: | ||
if not scripts[2] and not forceDetect then | if not scripts[2] and not forceDetect then | ||
-- Necessary, because Hani covers the entire Han range (while the Hant & Hans lists don't list shared characters). | -- Necessary, because Hani covers the entire Han range (while the Hant & Hans lists don't list shared characters). | ||
if scripts[1]:countCharacters(text) > 0 then | if scripts[1]:getCode():match("^Han") and require("Module:scripts").getByCode("Hani", nil, nil, useRequire):countCharacters(text) > 0 then | ||
return scripts[1] | |||
elseif scripts[1]:countCharacters(text) > 0 then | |||
return scripts[1] | return scripts[1] | ||
else | else |