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 };
diff --git a/src/cards/repo-card.js b/src/cards/repo-card.js
index bbfda52d47778..0d47a7e18c38c 100644
--- a/src/cards/repo-card.js
+++ b/src/cards/repo-card.js
@@ -169,25 +169,30 @@ 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}
-
- `);
+ // by wrapping card.render into tag - fixes Incorrect formatting of repo card description Fixes #3956
+ 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 };