fix: fix youdao input key calculate mistake (unicode uncode)
This commit is contained in:
@ -71,6 +71,11 @@ return {
|
||||
},
|
||||
---@type table<string, string[]> order to display translate result
|
||||
order = {
|
||||
default = {
|
||||
'str',
|
||||
'translation',
|
||||
'definition',
|
||||
},
|
||||
offline = {
|
||||
'title',
|
||||
'tag',
|
||||
|
@ -75,7 +75,7 @@ function curl.get(uri, opts)
|
||||
}
|
||||
end
|
||||
|
||||
-- vim.pretty_print(table.concat(cmd, ' '))
|
||||
-- vim.print(table.concat(cmd, ' '))
|
||||
vim.fn.jobstart(table.concat(cmd, ' '), {
|
||||
stdin = 'null',
|
||||
on_stdout = on_stdout,
|
||||
|
@ -54,9 +54,11 @@ local function process(opts)
|
||||
local data = Trans.data.new(opts)
|
||||
if strategy[Trans.conf.query](data) then
|
||||
Trans.cache[data.str] = data
|
||||
end
|
||||
data.frontend:process(data)
|
||||
|
||||
data.frontend:process(data)
|
||||
else
|
||||
data.frontend:fallback()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
@ -143,6 +143,8 @@ function M.main_loop(func)
|
||||
coroutine.yield()
|
||||
end
|
||||
|
||||
|
||||
|
||||
---@class Trans
|
||||
---@field util TransUtil
|
||||
return M
|
||||
|
Reference in New Issue
Block a user