joplin-link-graph icon indicating copy to clipboard operation
joplin-link-graph copied to clipboard

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

Open XanatosX opened this issue 1 year ago • 6 comments

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.

XanatosX avatar Aug 23 '23 07:08 XanatosX

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.

Petr05 avatar Dec 13 '23 08:12 Petr05

@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.

treymo avatar Jan 19 '24 23:01 treymo

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.

XanatosX avatar Jan 22 '24 16:01 XanatosX

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

treymo avatar Jan 23 '24 01:01 treymo

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 avatar Jan 23 '24 02:01 Petr05

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

Petr05 avatar Jan 23 '24 04:01 Petr05