Add missing v prefix to the size badge URL (#1342)

* Add missing `v` prefix to the size badge URL

* Add missing `v` prefix to badge URL update script
This commit is contained in:
ylemkimon
2018-05-23 22:05:32 +09:00
committed by Erik Demaine
parent 4c3439192f
commit 41ac2456f0
2 changed files with 2 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ Promise.all(process.argv.slice(3).map(file =>
// Replace size badge url
// 1 - url prefix: https://img.badgesize.io/Khan/KaTeX/
// 2 - url suffix: /dist/katex.min.js?compression=gzip
const badgeRe = /(https:\/\/img\.badgesize\.io\/Khan\/KaTeX\/)(?:.+)(\/dist\/katex\.min\.js\?compression=gzip)/g;
const badgeRe = /(https:\/\/img\.badgesize\.io\/Khan\/KaTeX\/v)(?:.+)(\/dist\/katex\.min\.js\?compression=gzip)/g;
body = body.replace(badgeRe, (m, pre, post) => {
return pre + version + post;
});