ignore tokens < length 3 in the ignore list
This commit is contained in:
+2
-2
@@ -103,7 +103,7 @@ L:RegisterTranslations("enUS", function()
|
||||
["Expiring latest -> soonest"] = true,
|
||||
["Not ignored"] = true,
|
||||
["Ignored Mobs List (Enter to save)"] = true,
|
||||
["Ignored Mobs Desc"] = "Comma separated list of strings to ignore if found in the unit name. If you use any of these regex characters (*+%?) it will do a regex search otherwise it will do a plain text search. So both Rift-Lost and Rift%-Lost should work.",
|
||||
["Ignored Mobs Desc"] = "Comma separated list of strings to ignore if found in the unit name. Tokens shorter than 3 characters are ignored. If you use any of these regex characters (*+%?) it will do a regex search otherwise it will do a plain text search. So both Rift-Lost and Rift%-Lost should work.",
|
||||
["Shared Faerie Fire"] = true,
|
||||
["This will show other player's Faerie Fires and avoid trying to cast Faerie Fire on those mobs"] = true,
|
||||
|
||||
@@ -313,7 +313,7 @@ L:RegisterTranslations("zhCN", function()
|
||||
["Expiring latest -> soonest"] = "最新->即将到期",
|
||||
["Not ignored"] = "不被忽略",
|
||||
["Ignored Mobs List (Enter to save)"] = "忽略的怪物列表(回车保存)",
|
||||
["Ignored Mobs Desc"] = "用逗号分隔的字符串列表,如果在单位名称中找到则忽略。如果你使用了这些正则表达式字符(*+%?),它将进行正则表达式搜索,否则将进行纯文本搜索。所以Rift-Lost和Rift%-Lost都应该有效.",
|
||||
["Ignored Mobs Desc"] = "用逗号分隔的字符串列表,如果在单位名称中找到则忽略。少于3个字符的条目会被忽略。如果你使用了这些正则表达式字符(*+%?),它将进行正则表达式搜索,否则将进行纯文本搜索。所以Rift-Lost和Rift%-Lost都应该有效.",
|
||||
["Shared Faerie Fire"] = "共享精灵之火",
|
||||
["This will show other player's Faerie Fires and avoid trying to cast Faerie Fire on those mobs"] = "这将显示其他玩家的精灵之火,并避免尝试在这些怪物上施放精灵之火",
|
||||
|
||||
|
||||
+8
-2
@@ -62,11 +62,17 @@ local function splitString(str, delimiter)
|
||||
local from = 1
|
||||
local delim_from, delim_to = string.find(str, delimiter, from)
|
||||
while delim_from do
|
||||
table.insert(result, string.sub(str, from, delim_from - 1))
|
||||
local token = string.sub(str, from, delim_from - 1)
|
||||
if string.len(token) >= 3 then
|
||||
table.insert(result, token)
|
||||
end
|
||||
from = delim_to + 1
|
||||
delim_from, delim_to = string.find(str, delimiter, from)
|
||||
end
|
||||
table.insert(result, string.sub(str, from))
|
||||
local token = string.sub(str, from)
|
||||
if string.len(token) >= 3 then
|
||||
table.insert(result, token)
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user