13 Commits

Author SHA1 Message Date
bc06efc446 Create new note when clicking on non existing Wiki Link
Fixes #240
2020-10-22 23:57:53 +02:00
289182b12e Fix Parent relative links not working
Fixes #256
2020-09-24 16:46:24 +02:00
a28fc308c0 Resolve "normal links" without a file extension
This is against the markdown spec, but the foam documentaiton seem to
have this in a number of places.
2020-09-14 17:41:53 +02:00
d2326658d4 LinkResolver: Make sure wiki link objects are properly resolved
There was no test for this, so it wasn't caught when I accidently broke
it today morning.
2020-09-14 17:39:20 +02:00
c94ff85804 Overhaul Link parsing
We were mixing up header links with wiki links and the alt text. It was
a bit messy. We currently do not support linking to a particular part of
a note. Nor do we support wiki links as link references.

Fixes APP-A0
2020-09-14 12:20:15 +02:00
1e0fdb9f06 Fix WikiLink resolution
I apparently wasn't following exactly what Obsidian was doing. This
algorithm is getting a bit complex and should be documented, also now
I'm not sure how other apps are doing it, and maybe I should have
specific link resolvers per 'app'.
2020-08-16 15:05:16 +02:00
2fcdfa0d6c Note Backlinks: Use the linkResolver
The backlinks should use the same algorithm for determining the links as
is used when clicking on a link.
2020-08-14 16:44:54 +02:00
bf97887e10 Fix relative Markdown links
While implementing Wiki Links, I seem to have accidentally broken them.
2020-08-14 16:14:00 +02:00
71b3d841da LinkResolve: Handle complex paths such as ../foo/../bah.md
Also add some more tests for other cases.
2020-08-11 13:33:50 +02:00
7e6a74dbba WikiLinks: Always resolve from the base path
Fixes #212

With this [[Fire]] will always resolve the rootFolder/Fire.md
irrespective of which note it appears in. This is analogous to the way
Obsidian works.
2020-08-11 00:11:45 +02:00
3d23d2b343 LinkResolver: Resolve links with extra spaces 2020-08-11 00:07:38 +02:00
5779fd380e LinkResolver: Add more tests 2020-08-11 00:04:42 +02:00
0c467e6b01 Move LinkResolving code to its own class
It has become sufficiently complex that a number of edge cases need to
be tested.
2020-08-10 23:49:09 +02:00