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

InputPathToUrlTransformPlugin does not work with file names containing spaces #3559

Closed
xplosionmind opened this issue Nov 25, 2024 · 4 comments

Comments

@xplosionmind
Copy link

xplosionmind commented Nov 25, 2024

Operating system

Fedora 41

Eleventy

3.0.0

Describe the bug

When inserting an url-escaped path to a local Markdown file in a Markdown link, the transformation does not work. I tried both with relative and absolute paths, and I tried both escaping and not escaping the space.

Reproduction steps

  1. In the same directory, create two templates, templateone.md and template two.md.
  2. In templateone.md, write [Link to template two](template%20two.md).
  3. The output does not convert the Markdown link to an existing HTML output file

Expected behavior

The link to template two.md should be transformed and working.

Reproduction

https://github.com/xplosionmind/tommi.space/tree/transform-bug

Note 1: the repository is very messed up, that bransh has been published just to debug this issue. (E.g. It is normal that the CSS is broken)
Note 2: Please use the file content/jam/public/Test.md for debugging
Note 3: The function used to generate permalinks might be relevant? https://github.com/xplosionmind/tommi.space/blob/transform-bug/.eleventy.js#L39-L41

@xplosionmind
Copy link
Author

Hey @zachleat, pinging just to say that if you skipped this because you ran in the same error you mentioned in #3560, I now pushed a small fix removing the dependency that was blocking things, preventing you from replicating the issue.

Thank you so much for your work!

@zachleat zachleat self-assigned this Dec 12, 2024
@zachleat zachleat added this to the Eleventy 3.0.1 milestone Dec 12, 2024
zachleat added a commit that referenced this issue Dec 12, 2024
zachleat added a commit that referenced this issue Dec 12, 2024
@zachleat
Copy link
Member

Can confirm that this is a duplicate of #3583 which is shipping with v3.0.1-alpha.1. Make sure that any links in your markdown are properly escaped though! (e.g. [Link test](</template two.md>) with the plugin or [Link test](</template two/>) independent of our plugin)

Note the tests added in 5b82281 and 7bd5295 if you want further examples!

@xplosionmind
Copy link
Author

Thank you @zachleat! Unfortunately, I did not spot the existing issue…

@zachleat
Copy link
Member

No worries! It is my job to connect the issues!

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

No branches or pull requests

2 participants