mirror of
https://github.com/Ascyii/typstar.git
synced 2026-01-01 05:24:24 -05:00
fix: better excalidraw path regex
This commit is contained in:
@@ -33,7 +33,7 @@ end
|
|||||||
function M.open_drawing()
|
function M.open_drawing()
|
||||||
local line = vim.api.nvim_get_current_line()
|
local line = vim.api.nvim_get_current_line()
|
||||||
local path = vim.fn.expand('%:p:h') ..
|
local path = vim.fn.expand('%:p:h') ..
|
||||||
'/' .. string.match(line, 'image%("(.*)' .. string.gsub(cfg.fileExtensionInserted, '%.', '%%%.')) ..
|
'/' .. string.match(line, '"(.*)' .. string.gsub(cfg.fileExtensionInserted, '%.', '%%%.')) ..
|
||||||
'.excalidraw.md'
|
'.excalidraw.md'
|
||||||
launch_obsidian_open(path)
|
launch_obsidian_open(path)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user