Fix update-dependents-count script (#8875)

This commit is contained in:
fisker Cheung authored and GitHub committed 2020-07-31 19:36:12 +08:00
1 parent a4a0e1ebdd
commit 8d94976bed
2 files changed
+3 -3

No files matched your search

@@ -30,7 +30,7 @@ async function update() {
githubPage
.replace(/\n/g, "")
.match(
/<svg.*?octicon-gist.*?>.*?<\/svg>\s*([\d,]+?)\s*Repositories\s*<\/a>/
/<svg.*?octicon-code-square.*?>.*?<\/svg>\s*([\d,]+?)\s*Repositories\s*<\/a>/
)[1]
.replace(/,/g, "")
);
@@ -60,7 +60,7 @@ function formatNumber(value) {
if (value < 1e6) {
return Math.floor(value / 1e2) / 10 + "k";
}
return Math.floor(value / 1e5) / 10 + "M";
return Math.floor(value / 1e5) / 10 + " million";
}
module.exports = async function () {
+1 -1
View File
@@ -303,7 +303,7 @@ const UsersSection = ({ language }) => {
<div style={{ marginLeft: ".7em", width: "260px" }}>
<p>
More than{" "}
<strong data-placeholder="dependent-github">1.7 million</strong>{" "}
<strong data-placeholder="dependent-github">1.8 million</strong>{" "}
dependent repositories on GitHub
</p>
<Button href="https://github.com/prettier/prettier/network/dependents">