Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown to WikiLink not handling Display Text with Parenthesis Properly #30

Open
dvdmtw98 opened this issue Jan 25, 2024 · 2 comments
Open

Comments

@dvdmtw98
Copy link

I was using Markdown links with Display Text throughout my Vault. I used your script to convert them to WikiLinks using the Relative Path option. The convertion worked properly for most of the links but the links that used (...) where not converted properly.

link-2
link-3

The code seems to be adding the part of the Display Text to the start of the converted WikiLink.

@dvdmtw98
Copy link
Author

dvdmtw98 commented Jan 25, 2024

The script also seems to convert some external links.

The 2nd link is the original link. The 1st link is the output of the script. I guess it say the # in the link and tried to convert it.

image

This is another external link which the script tried to convert. 2nd link original. 1st link converted output.

image

@19bufordcarl
Copy link

I had a similar issue when converting markdown to wiki links relative pathing for the purpose of using perlite. It was not aliasing to the file name by default. I'm not sure if I had a wrong setting but I found it faster just to make a fork and change the code a bit. The checkbox issue still happens, but this also fixes the issue of converting inside tables breaking because of the | character.

https://github.com/19bufordcarl/obsidian-link-converter

I made it super quick so I didn't actually account for the different types of paths because I didn't want to figure out how that logic worked, I just know it's broken and I only fixed it for relative pathing, it might have broken other stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants