This commit is contained in:
mirtlecn 2024-05-16 17:43:54 +08:00
parent d934ea1409
commit 7c30818aac

View File

@ -7,7 +7,7 @@ local M = {}
function M.init(env) function M.init(env)
local config = env.engine.schema.config local config = env.engine.schema.config
env.name_space = env.name_space:gsub('^*', '') env.name_space = env.name_space:gsub('^*', '')
env.is_in_user_dict = config:get_bool(env.name_space) or nil M.is_in_user_dict = config:get_bool(env.name_space) or nil
end end
local is_user = { local is_user = {
@ -17,7 +17,7 @@ local is_user = {
function M.func(input) function M.func(input)
for cand in input:iter() do for cand in input:iter() do
if is_user[cand.type] == env.is_in_user_dict then if is_user[cand.type] == M.is_in_user_dict then
cand.comment = cand.comment .. '*' cand.comment = cand.comment .. '*'
end end
yield(cand) yield(cand)