From 7bd166717d21197c10c95e20dcbd1d3e09ad6f20 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sat, 25 Dec 2021 00:52:52 -0500 Subject: [PATCH] [F] Markdown: Fix add() --- src/scripts/extended_markdown.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/scripts/extended_markdown.ts b/src/scripts/extended_markdown.ts index 6f1ef6b..b2fe2c9 100644 --- a/src/scripts/extended_markdown.ts +++ b/src/scripts/extended_markdown.ts @@ -60,7 +60,7 @@ export function parseExtensions(raw: string): string */ function add(s: string) { - lines[i].replace(re.command, s) + lines[i] = lines[i].replace(re.command, s) } // Run all commands in markdown @@ -78,10 +78,14 @@ export function parseExtensions(raw: string): string // Run cmd console.log(`Running command`, cmd) eval(cmd) + + // Remove cmd + lines[i] = lines[i].replace(re.command, '') } i++; } + console.log(lines.join('\n')) return lines.join('\n') }