diff --git a/scripts/build.ts b/scripts/build.ts index 6db2a149..020275b9 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -140,15 +140,15 @@ function handleFootnote(md: string) { if (!md.includes('[^')) return md // Replace footnote references with HTML superscript tags - md = md.replace(/\[\^(\d+)\](?::\s*(.*))?/g, (match, id, text) => text ? + return md.replace(/\[\^(\d+)\](?::\s*(.*))?/g, (match, id, text) => text ? // Footnote definition `
  • ${text}
  • ` : // Footnote reference `${id}` ) - + // Wrap the footnote definitions in an ordered list - return md.replace(/(
  • )/gs, '
      \n$1\n
    ') } // Copy `people/${dirname}/photos` to `dist/people/${dirname}/`.