From 41ac2456f0ef2179463e205525f7417f365efe5b Mon Sep 17 00:00:00 2001 From: ylemkimon Date: Wed, 23 May 2018 22:05:32 +0900 Subject: [PATCH] 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 --- README.md | 2 +- update-sri.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bbf4743f..61d2d422 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/update-sri.js b/update-sri.js index 3c966af3..103b2b83 100644 --- a/update-sri.js +++ b/update-sri.js @@ -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; });