mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 11:48:41 +00:00
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:
@@ -2,7 +2,7 @@
|
|||||||
[](https://travis-ci.org/Khan/KaTeX)
|
[](https://travis-ci.org/Khan/KaTeX)
|
||||||
[](https://codecov.io/gh/Khan/KaTeX)
|
[](https://codecov.io/gh/Khan/KaTeX)
|
||||||
[](https://gitter.im/Khan/KaTeX?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://gitter.im/Khan/KaTeX?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||

|

|
||||||
|
|
||||||
KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web.
|
KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web.
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@ Promise.all(process.argv.slice(3).map(file =>
|
|||||||
// Replace size badge url
|
// Replace size badge url
|
||||||
// 1 - url prefix: https://img.badgesize.io/Khan/KaTeX/
|
// 1 - url prefix: https://img.badgesize.io/Khan/KaTeX/
|
||||||
// 2 - url suffix: /dist/katex.min.js?compression=gzip
|
// 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) => {
|
body = body.replace(badgeRe, (m, pre, post) => {
|
||||||
return pre + version + post;
|
return pre + version + post;
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user