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

@@ -2,7 +2,7 @@
[![Build Status](https://travis-ci.org/Khan/KaTeX.svg?branch=master)](https://travis-ci.org/Khan/KaTeX)
[![codecov](https://codecov.io/gh/Khan/KaTeX/branch/master/graph/badge.svg)](https://codecov.io/gh/Khan/KaTeX)
[![Join the chat at https://gitter.im/Khan/KaTeX](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Khan/KaTeX?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
![](https://img.badgesize.io/Khan/KaTeX/0.10.0-alpha/dist/katex.min.js?compression=gzip)
![](https://img.badgesize.io/Khan/KaTeX/v0.10.0-alpha/dist/katex.min.js?compression=gzip)
KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web.

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;
});