oflisback/obsidian-bridge.nvim

[Bug] Wrong path separator in Windows

pidgeon777 opened this issue · 4 comments

This line:

return string.match(filename_incl_path, ".+/(.+)$")

Should be changed to something as follows:

local path_sep = (vim.fn.has("win32") == 1) and "\\" or "/"

return string.match(filename_incl_path, ".+".. path_sep .. "(.+)$")

By doing so, the plugin will work on Windows as well.

Thank you that seems likely to be correct. Do you have access to a windows environment? Would you mind making a PR and check that it works on windows, then I can verify on my side and we can integrate it.

Hopefully this was fixed with #13 🤞

Finally got a chance to test it out for a longer period of time and it's working. I also used the scroll sync patch, and its working well!

Thanks for the info, that's great! :)