Skip to content

Commit 2251448

Browse files
committed
fix: encode % symbol in badge url
1 parent 92c1bd2 commit 2251448

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# check-code-coverage [![ci status][ci image]][ci url]
1+
# check-code-coverage [![ci status][ci image]][ci url] ![check-code-coverage](https://img.shields.io/badge/code--coverage-100%25-brightgreen)
22
> Utilities for checking the coverage produced by NYC against extra or missing files
33
44
## Use

bin/update-badge.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ function updateBadge(args) {
6969

7070
// note, Shields.io escaped '-' with '--'
7171
const coverageRe = new RegExp(
72-
`https://img\\.shields\\.io/badge/code--coverage-\\d+%-${availableColorsReStr}`,
72+
`https://img\\.shields\\.io/badge/code--coverage-\\d+%25-${availableColorsReStr}`,
7373
)
74-
const coverageBadge = `https://img.shields.io/badge/code--coverage-${pct}%-${color}`
74+
const coverageBadge = `https://img.shields.io/badge/code--coverage-${pct}%25-${color}`
7575
debug('coverage regex: "%s"', coverageRe)
7676
debug('new coverage badge: "%s"', coverageBadge)
7777

0 commit comments

Comments
 (0)