vernak2539 / astro-rehype-relative-markdown-links

Rehype Plugin for Astro that allows for usage of relative links between markdown files
https://www.npmjs.com/package/astro-rehype-relative-markdown-links
12 stars 4 forks source link

Handle spaces in URLs using decodeURI() function #4

Closed Programmerino closed 8 months ago

Programmerino commented 9 months ago

This allows paths with encoded spaces (%20) to be converted back into real space characters, allowing them to be resolved. This allows consuming Markdown files from projects like obsidian-export which use this strategy for filenames with spaces in them.

Truth be told, I haven't done extensive testing on whether this causes unexpected results, but it does appear to fix the immediate issue of filenames with spaces being untouched.

vernak2539 commented 9 months ago

Thanks for this! I've just merged another PR that will unfortunately require conflicts to be resolved. I've added tests and such, so we can add one as well to make sure things are working! Again, thanks so much for the contribution!

vernak2539 commented 9 months ago

@Programmerino quick question. would you be able to provide me with some inputs and the expected outcomes? I have some time where I could pick this up with the new code, but want to make sure I produce the right code

vernak2539 commented 8 months ago

Fixed by #5