diff --git a/src/scripts/extended_markdown.ts b/src/scripts/extended_markdown.ts index 29e4825..2ab39d7 100644 --- a/src/scripts/extended_markdown.ts +++ b/src/scripts/extended_markdown.ts @@ -2,7 +2,7 @@ * Regex used in markdown extension parsing */ const re = { - command: //g, + command: /)/g, hashes: /^#+/g, } @@ -17,5 +17,19 @@ function parseExtensions(raw: string): string const lines = raw.replace('\r\n', '\n').split('\n') let i = 0 + // Run all commands in markdown + while (i < lines.length) + { + // Find commands + const r = re.command.exec(lines[i]) + if (!r) continue + const cmd = r[0].substring(5).trim() + + // Run cmd + eval(cmd) + + i++; + } + return raw }