benbalter / jekyll-relative-links

A Jekyll plugin to convert relative links to markdown files to their rendered equivalents
MIT License
141 stars 37 forks source link

Several link formats with brackets and spaces are not rewritten #38

Closed RaZeR-RBI closed 6 years ago

RaZeR-RBI commented 6 years ago

Greetings 😃 I've just started using Github Pages and put my generated documentation on it - my files work flawlessly when viewed from repository, but some links are not rewritten when viewing the generated site.

Here is a minimal example:

# Hello, world!

Working links:
* [Simple one](plain-one.md)
* [With square brackets and no spaces](square-[brackets].md)

Not working links (extension doesn't change):
* [Words with spaces](words with spaces.md)
* [Round brackets](round-(brackets).md)
* [Square brackets with spaces](square [brackets] with spaces.md)
* [Square brackets with text after it](square-[brackets]-heyo.md) - this one gets cut off

Maybe there is other patterns that don't work too, that's only the ones I've found so far. For a live example, you can view the website I'm talking about.

I was able to reproduce the issue on newly installed local Github Pages installation (gem 'github-pages', group: :jekyll_plugins).

I guess that the link extracting regexes don't cover these patterns, but I'm not sure. I've also considered an HTML escaping of links in my generator, but that would hurt readability of filenames when viewed from the repo, so I hope that this could be fixed. If any additional info is needed, I'll be happy to add it.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.