From ff5c1deabce0938790e7506203771a302b089793 Mon Sep 17 00:00:00 2001 From: jackyzha0 Date: Sun, 18 Jul 2021 10:57:08 -0400 Subject: [PATCH] patch external link detection --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 9ad878f..03e805d 100644 --- a/main.go +++ b/main.go @@ -77,7 +77,7 @@ func walk(root, ext string) (res []Link) { func filter(links []Link) (res []Link) { for _, l := range links { // filter external and non-md - isInternal := strings.HasPrefix(l.Target, "/") + isInternal := !strings.HasPrefix(l.Target, "http") isMarkdown := filepath.Ext(l.Target) == "" || filepath.Ext(l.Target) == ".md" if isInternal && isMarkdown { res = append(res, l)