simov / markdown-viewer

Markdown Viewer / Browser Extension
MIT License
1.05k stars 133 forks source link

Automatically assign extensions #147

Open User087 opened 3 years ago

User087 commented 3 years ago

For example, when I clone the WinPython wiki (https://github.com/winpython/winpython/wiki), and then open Home.md in Chrome with Markdown Viewer enabled, then I click 'Installation' near the bottom of the page, the result is 'Your file couldn't be accessed', presumably because it's trying to access a file 'Installation' that has no extension, whereas the file in the cloned wiki is 'Installation.md'. I suppose this isn't much of a problem in the online WinPython wiki, where the extensionless 'Installation' probably defaults to an html file. Is there a way to get Markdown Viewer to automatically add the .md extension in such cases, so when I click 'Installation' it opens 'Installation.md'?

simov commented 3 years ago

As long as markdown content is being served on certain routes you can configure the path matching regexp to enable Markdown Viewer on those routes, otherwise no, dynamically updating URLs is not supported.