Correct http encoding and string cleaning

This commit is contained in:
2024-02-18 13:58:54 +01:00
parent 2e85e2e9d5
commit 00ebaafc26

View File

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