Link Refernces: Normalize the path properly

This commit is contained in:
Vishesh Handa
2020-09-14 22:12:08 +02:00
parent f82e239985
commit 0a2a5532f5
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ class LinkExtractor implements md.NodeVisitor {
return;
}
if (url.startsWith('#')) {
if (url.startsWith('#') || url.startsWith('//')) {
var link = Link(
publicTerm: title,
filePath: filePath,

View File

@ -104,7 +104,7 @@ List<Link> parseLinks(String body, String filePath) {
l.headingID = path;
l.filePath = filePath;
} else {
l.filePath = p.join(parentFolderPath, p.normalize(path));
l.filePath = p.normalize(p.join(parentFolderPath, path));
}
links.add(l);
});