simov / markdown-viewer

Markdown Viewer / Browser Extension
MIT License
1.01k stars 131 forks source link

Hyperlink navigation to local file paths with a `\` backslash is not supported. #225

Open Scrivener07 opened 6 months ago

Scrivener07 commented 6 months ago

Hyperlink navigation to local file paths with a \ backslash is not supported.

For example, if I have a markdown document with a relative file URL using Windows file path separators like this.

[MyFile](files\MyFile.md)

Following the link will generate a path like this which doesn't resolve to a local file URL. As you can see, the \ characters were replaces with %5C.

file:///G:/files%5CMyFile.md

The user side solution is to use / forward slashes for markdown documents that navigate to file URLs.

I don't know if you want to call this a bug or feature request. It's up to you if you want to accommodate this.

Thanks for the neat tool :)