aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/index
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2025-08-05 13:37:29 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2025-08-05 13:37:29 -0400
commit2263b41287ed5dc9c1c4416cc296581f3a466144 (patch)
tree58e8767afed7365c07d993808a68ea93bcd7c841 /pkg/index
parent10d5e4db7ad9fe9855a19977f7bc037b058bfead (diff)
Change link parsing regex to support trailing slash
Diffstat (limited to 'pkg/index')
-rw-r--r--pkg/index/index.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/index/index.go b/pkg/index/index.go
index c69f36d..0c014ee 100644
--- a/pkg/index/index.go
+++ b/pkg/index/index.go
@@ -501,8 +501,8 @@ func ParseDocs(paths []string, numWorkers uint, opts ParseOpts) (map[string]*Doc
func init() {
headingPattern := `(?:^|\n)(?<heading>#{1,6}.*)`
- linkPattern := `\[.*\]\(\s*(?<link>.*)\b\s*\)`
- linkHeading := `(?:^|\n)(?<lh_heading>#{1,6}\s*\[.*\])\(\s*(?<lh_link>.*)\b\s*\)`
+ linkPattern := `\[.*\]\(\s*(?<link>.*(?:\b|/))\s*\)`
+ linkHeading := `(?:^|\n)(?<lh_heading>#{1,6}\s*\[.*\])\(\s*(?<lh_link>.*(?:\b|/))\s*\)`
DocParseRegex = regexp.MustCompile(
linkHeading + "|" +
headingPattern + "|" +