treymo / joplin-link-graph

UI for viewing connections between different Joplin notes
MIT License
252 stars 11 forks source link

[FEATURE] Does not work with the "links at the end format" #67

Open XanatosX opened 1 year ago

XanatosX commented 1 year ago

It seems like this plugin does not work correctly with links defined at the end of the markdown as seen here

grafik

Since this is common practice for markdown I would like to see this working as well.

Petr05 commented 11 months ago

Agreed! Most of my Joplin notes are linked via 'reference link' formatting (this example includes a URL rather than a note ID). Sadly, with this particular note-linking syntax unaccounted for, the graph is essentially ineffective for my particular use.

treymo commented 9 months ago

@XanatosX what do you mean by "links defined at the end of the markdown"- I don't quite understand. In the preview pane of your note, it doesn't look like it's rendering anything under "Fleisch". That makes me think Joplin doesn't even understand that link format.

@Petr05 Joplin does not appear to support links of the "reference link" format: [<link text>]: <link destination>. Are you able to products links in Joplin that are clickable with that format? (Ignoring this graph plugin for now)

I think you are both asking about Reference Link Format which, as far as I can tell, is not supported by Joplin markdown. I could totally be wrong but I couldn't get it working on my machine.

XanatosX commented 9 months ago

I did create a small test file to confirm that this is indeed working.

image image

Both links are clickable and do work.

I do use the following Joplin configuration

Joplin 2.13.13 (prod, win32)

Client ID: 1af169ac80bd4ef1ae58b10185346988
Sync Version: 3
Profile Version: 44
Keychain Supported: Yes

Revision: c3cdeeb

Link Graph UI: 1.5.0
MultiMarkdown Table Tools: 1.1.0
Note Link System: 0.8.0
Publish to Web: 1.1.0
Templates: 2.4.0

So Joplin can work with the provided format, at least on a windows machine with the plugins listed above. Hopefully that information is helpful.

treymo commented 9 months ago

Ahhh, I see, I didn't quite understand the format. I was able to confirm that Joplin does indeed work with those.

This would definitely be possible, would just require changes to how we parse links from an individual note. So basically just a second regex in the existing getAllLinksForNote function. No clue when I would be able to get to this but should be doable

Petr05 commented 9 months ago

This post is in plaintext for demonstration

Spot on, ["reference link"][ref-link] is the formatting in question so we're all on the same page here.   
If/when the plugin becomes compatible with it, I'll be very grateful! Also grateful, of course, for the effort you've already invested.  

[ref-link]: https://spec.commonmark.org/0.30/#full-reference-link
Petr05 commented 9 months ago

Also, I've re-opened this same issue beyond the scope of joplin-link-graph: https://discourse.joplinapp.org/t/links-to-other-notes-in-exported-html