diff options
Diffstat (limited to 'pkg/index')
| -rw-r--r-- | pkg/index/index.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/index/index.go b/pkg/index/index.go index 13c4f45..4db1eb4 100644 --- a/pkg/index/index.go +++ b/pkg/index/index.go @@ -368,7 +368,7 @@ func ParseDoc(path string, opts ParseOpts) (*Document, error) { panic("Link parsing regex returned unexpected number of matches") } link := string(match[1]) - if len(link) > 0 && len(strings.TrimSpace(link)) > 0 { + if len(link) > 0 { doc.Links = append(doc.Links, link) } } @@ -421,5 +421,5 @@ func ParseDocs(paths []string, numWorkers uint, opts ParseOpts) map[string]*Docu } func init() { - linkRegex = regexp.MustCompile(`\[.*\]\((.*)\)`) + linkRegex = regexp.MustCompile(`\[.*\]\(\s*(\S+)\s*\)`) } |
