From 79336657367e4fc1b53f6c62d2cb3c69dad9d157 Mon Sep 17 00:00:00 2001 From: Blake Allen Date: Sat, 23 Oct 2021 14:18:14 -0700 Subject: [PATCH] fix windows link index generation issue caused by backslashes --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 7fa5f6d..7e7d8e2 100644 --- a/main.go +++ b/main.go @@ -69,7 +69,7 @@ func parse(dir, pathPrefix string) []Link { target := strings.Split(processTarget(target), "#")[0] fmt.Printf(" %s\n", target) links = append(links, Link{ - Source: hugoPathTrim(trim(dir, pathPrefix, ".md")), + Source: filepath.ToSlash(hugoPathTrim(trim(dir, pathPrefix, ".md"))), Target: target, Text: text, })