edluffy / hologram.nvim

👻 A cross platform terminal image viewer for Neovim. Extensible and fast, written in Lua and C. Works on macOS and Linux.
MIT License
1.28k stars 31 forks source link

Fix markdown relative paths with "./" #37

Open x-delfino opened 1 year ago

x-delfino commented 1 year ago

Small change to allow for using relative paths starting with ./ for markdown image rendering

x-delfino commented 1 year ago

Actually - this only covers ./, need to figure out some logic for longer relative paths - ../../ etc.

x-delfino commented 1 year ago

@edluffy - I've updated this now so it supports relative paths including ../../ and ./. I moved the path parsing logic to fs.lua as it seems to make more sense being there