From fb030576ba4f2c7b6115749128daefcd037a5b6b Mon Sep 17 00:00:00 2001 From: Sagar Bendale <99851764+sagarbendale2004@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:09:00 +0530 Subject: [PATCH 1/3] Update repo-card.js --- src/cards/repo-card.js | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/src/cards/repo-card.js b/src/cards/repo-card.js index bbfda52d47778..e3b42b51e519a 100644 --- a/src/cards/repo-card.js +++ b/src/cards/repo-card.js @@ -169,25 +169,29 @@ const renderRepoCard = (repo, options = {}) => { .badge rect { opacity: 0.2 } `); - return card.render(` - ${ - isTemplate - ? // @ts-ignore - getBadgeSVG(i18n.t("repocard.template"), colors.textColor) - : isArchived - ? // @ts-ignore - getBadgeSVG(i18n.t("repocard.archived"), colors.textColor) - : "" - } - - - ${descriptionSvg} - - - - ${starAndForkCount} - - `); + return ` + + ${card.render(` + ${ + isTemplate + ? // @ts-ignore + getBadgeSVG(i18n.t("repocard.template"), colors.textColor) + : isArchived + ? // @ts-ignore + getBadgeSVG(i18n.t("repocard.archived"), colors.textColor) + : "" + } + + + ${descriptionSvg} + + + + ${starAndForkCount} + + `)} + + `; }; export { renderRepoCard }; From 11fb327da6426125e8f542ad0182959243dad046 Mon Sep 17 00:00:00 2001 From: Sagar Bendale <99851764+sagarbendale2004@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:11:19 +0530 Subject: [PATCH 2/3] Update gist-card.js --- src/cards/gist-card.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/cards/gist-card.js b/src/cards/gist-card.js index 9e889e74424cd..5b65a8c63bc73 100644 --- a/src/cards/gist-card.js +++ b/src/cards/gist-card.js @@ -137,15 +137,16 @@ const renderGistCard = (gistData, options = {}) => { `); card.setHideBorder(hide_border); - return card.render(` - + return ` + ${card.render(` + ${descriptionSvg} - - - + + ${starAndForkCount} - - `); + + `)} + `; }; export { renderGistCard, HEADER_MAX_LENGTH }; From cdf544137811f4acc313e525278992f40b97b96f Mon Sep 17 00:00:00 2001 From: Sagar Bendale <99851764+sagarbendale2004@users.noreply.github.com> Date: Tue, 1 Oct 2024 12:41:48 +0530 Subject: [PATCH 3/3] fixes #3956 bug - update repo-card.js --- src/cards/repo-card.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cards/repo-card.js b/src/cards/repo-card.js index e3b42b51e519a..320cdcd190d4a 100644 --- a/src/cards/repo-card.js +++ b/src/cards/repo-card.js @@ -169,8 +169,9 @@ const renderRepoCard = (repo, options = {}) => { .badge rect { opacity: 0.2 } `); + // by wrapping card.render into tag - Incorrect formatting of repo card description Fixes return ` - + ${card.render(` ${ isTemplate