From 1381aca260d49fdce976bc134e31ee9cde153ed2 Mon Sep 17 00:00:00 2001 From: Elihuso Date: Mon, 6 May 2024 08:27:44 +0800 Subject: [PATCH] [+] handle strikethrough --- scripts/build.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/build.ts b/scripts/build.ts index 6c5403e1..cc7f2b1a 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -153,6 +153,9 @@ function buildPeoplePages() { // Handle Footnote markdown = handleFootnote(markdown) + // Handle Delete Line: ~~something~~ to something + markdown = handleDeleteLine(markdown) + // Handle Icon markdown = handleNoteIcon(markdown) @@ -184,6 +187,12 @@ function handleFootnote(md: string) { .replace(/(
  • " + text + "")); +} + function handleNoteIcon(md: string): string { if (!md.includes('[!')) return md; return md.replace(/\[\!(\w+)\](?::\s*(.*))?/g, (match, icon, _) => (Icon[icon as string]));