From fc02923082122d22f919ae413a536c2a886ed092 Mon Sep 17 00:00:00 2001 From: EdJoPaTo Date: Wed, 8 Jan 2020 09:48:05 +0100 Subject: [PATCH] fix(markdown): replace not only first bad char --- source/markdown.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/markdown.ts b/source/markdown.ts index 5be28a1..7e67ec8 100644 --- a/source/markdown.ts +++ b/source/markdown.ts @@ -7,11 +7,11 @@ function escape(text: string): string { } function bold(text: string): string { - return `*${text.replace(/\*/, '')}*` + return `*${text.replace(/\*/g, '')}*` } function italic(text: string): string { - return `_${text.replace(/_/, '')}_` + return `_${text.replace(/_/g, '')}_` } function monospace(text: string): string {