chore: add dependabot, remove html comments from post excerpts

This commit is contained in:
radishzzz 2025-05-29 18:58:26 +01:00
parent e8c2ac5790
commit adbad9a0a4
5 changed files with 153 additions and 130 deletions

View file

@ -48,8 +48,9 @@ export function generateExcerpt(
if (!content)
return ''
// Remove Markdown headings
// Remove HTML comments and Markdown headings
const contentWithoutHeadings = content
.replace(/<!--[\s\S]*?-->/g, '')
.replace(/^#{1,6}\s+\S.*$/gm, '')
.replace(/\n{2,}/g, '\n\n')