mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-15 07:53:13 +08:00
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
This commit is contained in:
@ -173,7 +173,11 @@ class NoteSnippet extends StatelessWidget {
|
||||
|
||||
var body = note.body.split('\n');
|
||||
var paragraph = body.firstWhere(
|
||||
(line) => line.contains('[${link.term}]'),
|
||||
(String line) {
|
||||
return link.isWikiLink
|
||||
? line.contains('[[${link.wikiTerm}}]]')
|
||||
: line.contains('[${link.publicTerm}]');
|
||||
},
|
||||
orElse: () => "",
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user