thomaskoppelaar / vscode-markdown-preview-wikilinks

Allows wikilinks features within the VSCode markdown preview.

Home Page:https://marketplace.visualstudio.com/items?itemName=thomaskoppelaar.markdown-wiki-links-preview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

links are corrupted in preview

af4jm opened this issue · comments

with a link [[self\-study notes|p.selfstudy notes]] I should see text "self-study notes" linking to file "selfstudy notes.md", but instead, I see "self\ study notes" (dash is changed to a space... bug #1) linking to "selfstudy-notes.md" (space is changed to a dash, bug #2... the link is broken)

bug #3: if the link text includes a period, the period AND EVERYTHING AFTER IT are stripped from the link text

Hi! A couple of things:

  • What settings are you using? I'm assuming you have ticked on "descriptionthenfile", and left the rest intact.
  • If this is the case, I dont understand how p.selfstudy notes should link to anything other than p.selfstudy-notes.md - I'll add a line in the readme describing the behavior of slugifying more explicitly.
  • As for \- being replaced by \ : That I'll fix.
  • As for the link text including a period: That's intentional, see the recent change in the readme.

Feel free to make a PR for any changes that you wish to see further, as I do not have much time to work on this project anymore.

I tried to use your extension with Dendron, because Dendron swaps in their own MD preview and it's a disaster (they know it, but it's going to be a while to get a proper fix)... if you're telling me that changing spaces to - in a file name is "normal" then sorry, I'll just uninstall & move on... if my filename has a - in it, I'll type a - in my wikilink

apologies if that sounds snarky, it's not my intent... your use case & mine are just different enough to be incompatible, as a dev I see that often

Yeah, fair. I had a feeling that you were using dendron. Apologies for the inconvenience.