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

[Bug]: Wikilink to Markdown link conversion has trailing "]" in filename #19

Closed
3 tasks done
Vuenc opened this issue Aug 10, 2022 · 1 comment
Closed
3 tasks done
Assignees

Comments

@Vuenc
Copy link

Vuenc commented Aug 10, 2022

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

I noticed the following bug for an image link that was converted to a markdown link: the link should have been "myfile.png", but was "myfile.png%5D", where the %5D is percent encoding for the "]" character.

I believe this bug comes from the convertWikilinks() method in convertText.ts: The fileRegex captures "[[", "|" and "]". A few lines later, "[[" and "|" are replaced by "", but "]" is not replaced.

Best and thanks for the useful plugin!

How to reproduce ?

Create a markdown file which references an image myfile.png via a link ![[myfile.png]].

Push the file to github.

Check if the image link has a trailing "%5D" which prevents it from working.

Configuration

Relevant log output

No response

OS

Linux

Anything else?

No response

@Mara-Li
Copy link
Member

Mara-Li commented Aug 11, 2022

Good catch ! I will fix that asap :)

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