19 Commits

Author SHA1 Message Date
c6665fa63e Simplify Settings/Config classes 2021-07-29 12:45:33 +02:00
c66eaf1052 NotesFolderConfig: Read directly from the SharedPref
It's super annoying that we have this class which reading from the
settings, so adding any new value involves updating some 12 new things.
2021-07-27 16:33:16 +02:00
d6e2f09a72 Move all settings code to its own folder
Jumping around between the widgets / screens and outside is bit
confusing. Also this way, I can add the stories right here.
2021-06-05 12:23:28 +02:00
9b4a67ba08 LinkResolver: Null Safety++ 2021-05-19 12:17:57 +02:00
d008f0d982 First version of dart migrate
Most of the files haven't been migrated. Lets work on this bit by bit
2021-04-10 22:18:35 +02:00
f75e119995 Make Settings take the folderName as a parameter 2020-10-23 02:29:48 +02:00
9499cea164 Remove Settings global
Stop it being a singleton. This means it needs to be passed around a
lot. This sucks, but it's how it should be. I shouldn't be using a
global variable to get around this.

This is needed as Settings will soon become repo specific when we
support multiple repos.

This breaks saving the settings in a file, that feature was toggled off
anyway. It needs to be thought over again.
2020-10-09 00:59:19 +02:00
4be9520ae6 LinkResolver: Add another test 2020-09-26 19:25:07 +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
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