My plugin (AutoMOC) heavily utilizes the generateMarkdownLink() function to create links to other notes. It is supposed to account for user link preferences (Wikilinks vs Markdown Links). It works fine normally, but breaks in the case where a user is using Markdown Links and has an alias in the note. For markdown links, [Alias](Filename.md)
would be the correct link. However, it seems like generateMarkdownLink() always appends the alias to the end of the link regardless of using Wikilinks for MarkdownLinks, making the output in this case [Filename](Filename.mdAlias)
. This results in a broken link.
Additionally, even in the case of Wikilinks (which should have the format [Filename](Filename.md|Alias)
), the |
separator is not automatically added. In my code I have to make the alias I want to add | + Alias
instead of just Alias
.
It’s possible I’m using this function incorrectly (and if I am, let me know), but I think this is a bug that needs to be resolved.