From 7a3970188e07e2bb85b189dad949eadb7e36666b Mon Sep 17 00:00:00 2001 From: Kid <44045911+kidonng@users.noreply.github.com> Date: Sat, 18 Jul 2020 01:32:13 +0800 Subject: [PATCH] fix(MarkdownV2): escape `-` in escape regex (#1) --- source/markdownv2.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/markdownv2.ts b/source/markdownv2.ts index e25edc4..594ae05 100644 --- a/source/markdownv2.ts +++ b/source/markdownv2.ts @@ -7,7 +7,7 @@ function escapeInteral(text: string, escapeChars: string): string { } function escape(text: string): string { - return text.replace(/[_*[\]()~`>#+-=|{}.!]/g, '\\$&') + return text.replace(/[_*[\]()~`>#+\-=|{}.!]/g, '\\$&') } function bold(text: string): string {