From 7ce254f1529cafbfc4af41f71eecd4b38c4f2159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A1ssio=20Botaro?= Date: Tue, 2 Apr 2019 20:25:56 -0300 Subject: [PATCH] Improve test (#2454) * adjust regex to caught corner case * fix wrong lines --- README.md | 4 ++-- repo_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 699cd959..ce58dc17 100644 --- a/README.md +++ b/README.md @@ -486,7 +486,7 @@ Please take a quick gander at the [contribution guidelines](https://github.com/a * [cachego](https://github.com/fabiorphp/cachego) - Golang Cache component for multiple drivers. * [cayley](https://github.com/google/cayley) - Graph database with support for multiple backends. * [dsc](https://github.com/viant/dsc) - Datastore connectivity for SQL, NoSQL, structured files. - * [gokv](https://github.com/philippgille/gokv) - Simple key-value store abstraction and implementations for Go (Redis, Consul, etcd, bbolt, BadgerDB, LevelDB, Memcached, DynamoDB, S3, PostgreSQL, MongoDB, CockroachDB and many more) + * [gokv](https://github.com/philippgille/gokv) - Simple key-value store abstraction and implementations for Go (Redis, Consul, etcd, bbolt, BadgerDB, LevelDB, Memcached, DynamoDB, S3, PostgreSQL, MongoDB, CockroachDB and many more). ## Date and Time @@ -1770,7 +1770,7 @@ See [go-hardware](https://github.com/rakyll/go-hardware) for a comprehensive lis * [formjson](https://github.com/rs/formjson) - Transparently handle JSON input as a standard form POST. * [go-server-timing](https://github.com/mitchellh/go-server-timing) - Add/parse Server-Timing header. * [Limiter](https://github.com/ulule/limiter) - Dead simple rate limit middleware for Go. -* [ln-paywall](https://github.com/philippgille/ln-paywall) - Go middleware for monetizing APIs on a per-request basis with the Lightning Network (Bitcoin) +* [ln-paywall](https://github.com/philippgille/ln-paywall) - Go middleware for monetizing APIs on a per-request basis with the Lightning Network (Bitcoin). * [Tollbooth](https://github.com/didip/tollbooth) - Rate limit HTTP request handler. * [XFF](https://github.com/sebest/xff) - Handle `X-Forwarded-For` header and friends. diff --git a/repo_test.go b/repo_test.go index fe3fe499..19ac5d4a 100644 --- a/repo_test.go +++ b/repo_test.go @@ -49,7 +49,7 @@ func TestDuplicatedLinks(t *testing.T) { var ( reContainsLink = regexp.MustCompile(`\* \[.*\]\(.*\)`) - reOnlyLink = regexp.MustCompile(`\* \[.*\]\(.*\)$`) + reOnlyLink = regexp.MustCompile(`\* \[.*\]\([^()]*\)$`) reLinkWithDescription = regexp.MustCompile(`\* \[.*\]\(.*\) - \S.*[\.\!]`) )