fix: fix youdao input key calculate mistake (unicode uncode)

This commit is contained in:
JuanZoran
2023-03-16 16:07:44 +08:00
parent 020876d8c4
commit 870be41bee
7 changed files with 91 additions and 91 deletions

View File

@ -71,6 +71,11 @@ return {
},
---@type table<string, string[]> order to display translate result
order = {
default = {
'str',
'translation',
'definition',
},
offline = {
'title',
'tag',

View File

@ -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,

View File

@ -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

View File

@ -143,6 +143,8 @@ function M.main_loop(func)
coroutine.yield()
end
---@class Trans
---@field util TransUtil
return M