fix: better excalidraw path regex

This commit is contained in:
arne314
2024-11-04 19:28:54 +01:00
parent 522297b879
commit 0d4e30043d

View File

@@ -33,7 +33,7 @@ end
function M.open_drawing()
local line = vim.api.nvim_get_current_line()
local path = vim.fn.expand('%:p:h') ..
'/' .. string.match(line, 'image%("(.*)' .. string.gsub(cfg.fileExtensionInserted, '%.', '%%%.')) ..
'/' .. string.match(line, '"(.*)' .. string.gsub(cfg.fileExtensionInserted, '%.', '%%%.')) ..
'.excalidraw.md'
launch_obsidian_open(path)
end