datopian / flowershow

💐 Publish your obsidian digital garden or any markdown site easily and elegantly.
https://flowershow.app/
MIT License
750 stars 92 forks source link

Broken links for accentuated notes #565

Closed 0rphee closed 8 months ago

0rphee commented 9 months ago

Hi! just started using this project, very cool!

So, I have at least one note, for which references to it seem broken, here's an example.

<a class="internal new transclusion" href="History of Ancient Philosophy - L">History of Ancient Philosophy - Lévystone Doc#1.3.1 Physical Appearance</a>

It also seems that for links with parentheses (ex. my Note (parens).md, this also happens (I have no examples, because I removed the parentheses to make the links work)

Thanks for your great work!

rufuspollock commented 9 months ago

Thanks for flagging and we'll take a look. @Gutts-n are you able to reproduce?

Gutts-n commented 9 months ago

@rufuspollock I'll take a look.

Gutts-n commented 9 months ago

In my tests here works well @0rphee, did you write the same name of the file that you want to link? image image image

0rphee commented 9 months ago

@Gutts-n sorry for the delay.

Yes, the note has the same name, the name of the note is the same as whats inside the tag.

As I had showed in the initial example, the href value, seems to get cut off. The full name of the the file is

Screenshot 2023-10-09 at 3 00 25 p m

The full link in the href should be (I think) History of Ancient Philosophy - Lévystone Doc#1.3.1 Physical Appearance, but using my previous example again, however, this is the html that is produced.

<a class="internal new transclusion" href="History of Ancient Philosophy - L">History of Ancient Philosophy - Lévystone Doc#1.3.1 Physical Appearance</a>

It seems to me, that the issue has to do with translating markdown wiki links to hrefs when there are characters like é á é í ó etc.

Gutts-n commented 8 months ago

Hey @0rphee we updated our lib that parses these URLs, update this package "@portaljs/remark-wiki-link" to "^1.1.1" in your project and let me know if worked.

0rphee commented 8 months ago

I've updated it @Gutts-n .Still not working though.

With the same file this is the result of the link: <a class="internal new transclusion" href="History of Ancient Philosophy ">History of Ancient Philosophy - Lévystone Doc#1.3.1 Physical Appearance</a>

Now instead of cutting of at the é, it cuts off at the -

Gutts-n commented 8 months ago

@0rphee Yep, I already fixed this new problem, but I need to someone do the code review for me. If the new change breaks your project feel free to back to the 1.1.0 version until we don't merge the new changes.

Gutts-n commented 8 months ago

@0rphee we merged the fix, you can use version ^1.1.2 of the package now. Let me know if the fix worked pls.

0rphee commented 8 months ago

@Gutts-n It works properly now. Thanks!