mirror of
https://github.com/Aviortheking/codestats-readme.git
synced 2025-07-26 22:29:49 +00:00
fix: proper apostrophe in stats card's header
* fix: remove 's' after apostrophe if name ends with 's' * fix: respect GITHUB_TOKEN env var before PAT_s * revert: verbose console log for retries * Revert "fix: respect GITHUB_TOKEN env var before PAT_s" This reverts commit 2becbe595c2df4580aa81d690482187b1e6ba512. * test: added test for title apostrophe Co-authored-by: anuraghazra <hazru.anurag@gmail.com>
This commit is contained in:
@ -124,9 +124,11 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
|
||||
});
|
||||
|
||||
// Conditionally rendered elements
|
||||
|
||||
const apostrophe = ["x", "s"].includes(name.slice(-1)) ? "" : "s";
|
||||
const title = hide_title
|
||||
? ""
|
||||
: `<text x="25" y="35" class="header">${name}'s GitHub Stats</text>`;
|
||||
: `<text x="25" y="35" class="header">${name}'${apostrophe} GitHub Stats</text>`;
|
||||
|
||||
const border = hide_border
|
||||
? ""
|
||||
|
Reference in New Issue
Block a user