diff --git a/packages/app/app/components/Commits.vue b/packages/app/app/components/Commits.vue index 606fae7f..18fc2122 100644 --- a/packages/app/app/components/Commits.vue +++ b/packages/app/app/components/Commits.vue @@ -68,10 +68,11 @@ onBeforeMount(async () => { ); }, code({ text }) { + const code = text.trim(); const currentTheme = document.documentElement.classList.contains("dark") ? "github-dark" : "github-light"; - const highlightedCode = shiki.codeToHtml(text, { + const highlightedCode = shiki.codeToHtml(code, { theme: currentTheme, lang: "bash", }); @@ -95,7 +96,7 @@ onBeforeMount(async () => {