Improve test (#2454)

* adjust regex to caught corner case

* fix wrong lines
This commit is contained in:
Cássio Botaro
2019-04-02 20:25:56 -03:00
committed by GitHub
parent fb08bf2238
commit 7ce254f152
2 changed files with 3 additions and 3 deletions

View File

@@ -49,7 +49,7 @@ func TestDuplicatedLinks(t *testing.T) {
var (
reContainsLink = regexp.MustCompile(`\* \[.*\]\(.*\)`)
reOnlyLink = regexp.MustCompile(`\* \[.*\]\(.*\)$`)
reOnlyLink = regexp.MustCompile(`\* \[.*\]\([^()]*\)$`)
reLinkWithDescription = regexp.MustCompile(`\* \[.*\]\(.*\) - \S.*[\.\!]`)
)