Correct http encoding and string cleaning
This commit is contained in:
parent
2e85e2e9d5
commit
00ebaafc26
|
@ -3,6 +3,8 @@ local M = {}
|
|||
function M.lookup()
|
||||
local keywords = vim.fn.getreg("*") -- receive yanked text
|
||||
local url = "https://dl.acm.org/action/doSearch?AllField=" .. keywords
|
||||
url = url:sub(2, #url)
|
||||
url, empty = url:gsub(" ", "+")
|
||||
|
||||
-- Setup a http socket and request
|
||||
local command = string.format("curl -s '%s'", url)
|
||||
|
|
Loading…
Reference in New Issue