mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 10:17:16 +08:00
LinkResolver: Handle strange path
Fixes APP-P8
This commit is contained in:
@ -15,12 +15,17 @@ class LinkResolver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var rootFolder = inputNote.parent.rootFolder;
|
var rootFolder = inputNote.parent.rootFolder;
|
||||||
assert(l.filePath.startsWith(rootFolder.folderPath));
|
if (l.filePath.startsWith(rootFolder.folderPath)) {
|
||||||
var spec = l.filePath.substring(rootFolder.folderPath.length + 1);
|
var spec = l.filePath.substring(rootFolder.folderPath.length);
|
||||||
|
if (spec.startsWith('/')) {
|
||||||
|
spec = spec.substring(1);
|
||||||
|
}
|
||||||
return _getNoteWithSpec(rootFolder, spec);
|
return _getNoteWithSpec(rootFolder, spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
Note resolve(String link) {
|
Note resolve(String link) {
|
||||||
if (isWikiLink(link)) {
|
if (isWikiLink(link)) {
|
||||||
// FIXME: What if the case is different?
|
// FIXME: What if the case is different?
|
||||||
|
Reference in New Issue
Block a user