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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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. * [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. * [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. * [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 ## 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. * [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. * [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. * [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. * [Tollbooth](https://github.com/didip/tollbooth) - Rate limit HTTP request handler.
* [XFF](https://github.com/sebest/xff) - Handle `X-Forwarded-For` header and friends. * [XFF](https://github.com/sebest/xff) - Handle `X-Forwarded-For` header and friends.

View File

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