diff --git a/util.go b/util.go index 015972c..72a29f3 100644 --- a/util.go +++ b/util.go @@ -82,6 +82,13 @@ func ParseLinks(blockId string, content string) ([]ParsedLink, error) { for scanner.Scan() { line := scanner.Text() + keywords := keywordsRE.FindAllStringSubmatch(line, -1) + for _, matches := range keywords { + link := matches[1] + l := cleanNameURL(link) + result = append(result, ParsedLink{blockId, link, l, line, ""}) + } + links := hrefRE.FindAllStringSubmatch(line, -1) for _, matches := range links { @@ -98,13 +105,6 @@ func ParseLinks(blockId string, content string) ([]ParsedLink, error) { l := cleanNameURL(link) result = append(result, ParsedLink{blockId, link, l, line, ""}) } - - keywords := keywordsRE.FindAllStringSubmatch(line, -1) - for _, matches := range keywords { - link := matches[1] - l := cleanNameURL(link) - result = append(result, ParsedLink{blockId, link, l, line, ""}) - } } return result, nil