Skip to content

Commit

Permalink
fix: exclude alerts from first child
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 20, 2024
1 parent a91ab1b commit 8731ece
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layers/core/app/server/plugins/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default defineNitroPlugin((nitroApp) => {
// Only use the first blockquote as the description
const firstChild = file.body.children?.[0]
const firstChildText = getTextContents(firstChild?.children)
if (firstChild?.tag === 'blockquote' && firstChildText) {
if (firstChild?.tag === 'blockquote' && firstChildText && !firstChildText.startsWith('!')) {
file.description = firstChildText
file.body.children.shift()
} else {
Expand Down

0 comments on commit 8731ece

Please sign in to comment.