diff --git a/utils/transform-markdown.ts b/utils/transform-markdown.ts index e0cd1d034c..c1a2deb81e 100644 --- a/utils/transform-markdown.ts +++ b/utils/transform-markdown.ts @@ -44,7 +44,7 @@ export const transformMarkdown = (content: string, slug: string) => .replace(//, ``) // {% note %} 轉換 .replace( - /
{% note (.*?) %}<\/p>(.*?)
{% endnote %}<\/p>/gs, + /
\s*{% note (.*?) %}\s*<\/p>(.*?)
\s*{% endnote %}\s*<\/p>/gs, (match, noteClass, content) => { const newContent = content.trim().replace(/^\s+|\s+$/g, ''); return `
`;