mkdocs-literate-nav
mkdocs-literate-nav copied to clipboard
Fix: always remove URL quotation from non http links.
Obsidian.md creates links to other markdown files by using URL quotation so instead [Link to a file](link to a file.md)
we will see [Link to a file](link%20to%20a%20file.md)
. If we remove URL quotation manually from a link, then Obsidian.md is not able to support this link and basic functionalities like link jumping and graph display are not working. Since MkDocs can be used as a presentation layer, then a valid place to remove URL quotations is to do it just before parsing markdown files and producing static documentation.
I don't understand, why wouldn't we simply always unquote the links? Are there any downsides? Or, can't the current behavior be considered buggy?
@oprypin I have checked the behavior of MkDocs itself and the encoded links are always unquoted/decoded. I will remove flag from the code and simplify the number of changes, so we will have a common behavior with MkDocs parser.
I have reverted most changes and just add one that is doing unquoting on nav elements that are non valid http links.