diff --git a/lib/core/links_loader.dart b/lib/core/links_loader.dart index b2ce17a9..1a99da8c 100644 --- a/lib/core/links_loader.dart +++ b/lib/core/links_loader.dart @@ -92,8 +92,11 @@ List _parseLinks(String body, String parentFolderPath) { } doc.linkReferences.forEach((key, value) { - var filePath = value.destination; - links.add(Link(term: key, filePath: filePath)); + var path = value.destination; + var isLocal = !path.contains('://'); + if (isLocal) { + links.add(Link(term: key, filePath: path)); + } }); return links; diff --git a/test/links_loader_test.dart b/test/links_loader_test.dart index 70a6661d..b4e32fb1 100644 --- a/test/links_loader_test.dart +++ b/test/links_loader_test.dart @@ -12,6 +12,9 @@ void main() { [Google](https://google.com) +[Google's Homepage][Google] + +[Google]: https://www.google.com/ """; test('Should load links', () async {