jakewvincent / mkdnflow.nvim

Fluent navigation and management of markdown notebooks
GNU General Public License v3.0
695 stars 41 forks source link

Bug: Can't find external file #172

Closed foodszhang closed 11 months ago

foodszhang commented 1 year ago

When I open associated files(from bib file) whose name contains spaces, it's always say that file doesn't seem to exist! 28332635cb00a7a5c78ed69af663571

so i debug it and found that in https://github.com/jakewvincent/mkdnflow.nvim/blob/a728a3533bb57502fdfd6fdb4e5839fc87430edc/lua/mkdnflow/paths.lua#L276 https://github.com/jakewvincent/mkdnflow.nvim/blob/a728a3533bb57502fdfd6fdb4e5839fc87430edc/lua/mkdnflow/paths.lua#L321-L322 path has been change to escaped path, but in open function , escapeChar is also called, so the last path variable used will use two slashes. https://github.com/jakewvincent/mkdnflow.nvim/blob/a728a3533bb57502fdfd6fdb4e5839fc87430edc/lua/mkdnflow/paths.lua#L260 https://github.com/jakewvincent/mkdnflow.nvim/blob/a728a3533bb57502fdfd6fdb4e5839fc87430edc/lua/mkdnflow/paths.lua#L72-L78

Finally, program report that it can't find the file. I make a small change to fix it, https://github.com/foodszhang/mkdnflow.nvim/commit/cc75dd4cda4df60b16e44f94ce2f6801fd7945bd it works well for this problem, but I was worried that it might cause other problems and that other places where this function was used might have the same error, so I didn't create a pull request.

jakewvincent commented 11 months ago

Hi @foodszhang, this should be fixed with the latest updates. Please try them out when you get a chance and let me know here if you experience any related issues. Closing this issue for now. Thanks!