From 6789f574b8385f3dbb8cd3143935acaae6742927 Mon Sep 17 00:00:00 2001 From: naive231 Date: Fri, 15 Nov 2024 09:00:48 +0800 Subject: [PATCH] [add] Add core implementation. --- main.ts | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/main.ts b/main.ts index bd3083f..7546952 100644 --- a/main.ts +++ b/main.ts @@ -147,15 +147,21 @@ function processLineBlock(source: string): string { } function applyFormatting(text: string): string { - // Replace **bold** with *bold* (with spaces) - text = text.replace(/\*\*(.*?)\*\*/g, ' *$1* '); - // Replace *italic* with _italic_ - text = text.replace(/(?