Escape square brackets in path
This commit is contained in:
parent
5c9e851d7c
commit
d20131133f
1 changed files with 1 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ local M = {}
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
-- get the current working directory and set the url
|
-- get the current working directory and set the url
|
||||||
local current_buffer = vim.fn.expand("%:p:h")
|
local current_buffer = vim.fn.expand("%:p:h"):gsub("%[", "\\["):gsub("%]", "\\]")
|
||||||
local repo_url = vim.fn.system("git -C " .. current_buffer .. " config --get remote.origin.url")
|
local repo_url = vim.fn.system("git -C " .. current_buffer .. " config --get remote.origin.url")
|
||||||
|
|
||||||
if repo_url:len() == 0 then
|
if repo_url:len() == 0 then
|
||||||
|
|
@ -56,7 +56,6 @@ function M.get_file_url(
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local file_page_url = M.repo_url .. "/blob/" .. get_current_branch_or_commit_with_priority(priority) .. file_path
|
local file_page_url = M.repo_url .. "/blob/" .. get_current_branch_or_commit_with_priority(priority) .. file_path
|
||||||
|
|
||||||
if range_start and not range_end then
|
if range_start and not range_end then
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue