mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 18:38:36 +08:00
Link Refernces: Normalize the path properly
This commit is contained in:
@ -82,7 +82,7 @@ class LinkExtractor implements md.NodeVisitor {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (url.startsWith('#')) {
|
if (url.startsWith('#') || url.startsWith('//')) {
|
||||||
var link = Link(
|
var link = Link(
|
||||||
publicTerm: title,
|
publicTerm: title,
|
||||||
filePath: filePath,
|
filePath: filePath,
|
||||||
|
@ -104,7 +104,7 @@ List<Link> parseLinks(String body, String filePath) {
|
|||||||
l.headingID = path;
|
l.headingID = path;
|
||||||
l.filePath = filePath;
|
l.filePath = filePath;
|
||||||
} else {
|
} else {
|
||||||
l.filePath = p.join(parentFolderPath, p.normalize(path));
|
l.filePath = p.normalize(p.join(parentFolderPath, path));
|
||||||
}
|
}
|
||||||
links.add(l);
|
links.add(l);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user