diff --git a/scripts/build.ts b/scripts/build.ts
index cc7f2b1a..b74d5e8a 100644
--- a/scripts/build.ts
+++ b/scripts/build.ts
@@ -8,7 +8,7 @@ import metadataParser from 'markdown-yaml-metadata-parser';
import { renderMdx } from "./mdx.js";
import moment from "moment";
-import { Icon, backSVG } from "./icon.js";
+import { handleFeatures } from "./feature.js";
const PUBLIC_DIR = "public";
@@ -150,14 +150,7 @@ function buildPeoplePages() {
// Read markdown page and remove markdown meta
let markdown = metadataParser(fs.readFileSync(path.join(srcPath, `page${lang}.md`), "utf-8")).content.replaceAll("", " */}");
- // Handle Footnote
- markdown = handleFootnote(markdown)
-
- // Handle Delete Line: ~~something~~ to something
- markdown = handleDeleteLine(markdown)
-
- // Handle Icon
- markdown = handleNoteIcon(markdown)
+ markdown = handleFeatures(markdown)
// Autocorrect markdown
markdown = autocorrect.formatFor(markdown, 'markdown')
@@ -172,32 +165,6 @@ function buildPeoplePages() {
}
}
-function handleFootnote(md: string) {
- if (!md.includes('[^')) return md
-
- // Replace footnote references with HTML superscript tags
- return md.replace(/\[\^(\d+)\](?::\s*(.*))?/g, (match, id, text) => text ?
- // Footnote definition
- `
${data.text}