From 39d1eb6deea73bed88b5fd1ffdd5cfd40c1e5ff2 Mon Sep 17 00:00:00 2001 From: Liam <byteslice@airmail.cc> Date: Sat, 25 Jan 2025 12:09:33 -0500 Subject: [PATCH] Escape more characters for markdown --- assets/js/markdowntoolbar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/markdowntoolbar.ts b/assets/js/markdowntoolbar.ts index 0b355e85..fd53c1b2 100644 --- a/assets/js/markdowntoolbar.ts +++ b/assets/js/markdowntoolbar.ts @@ -259,7 +259,7 @@ function escapeSelection(textarea: HTMLTextAreaElement, options: Partial<SyntaxH }; } - const newText = text.replace(/([*_[\]()^`%\\~<>#|])/g, '\\$1'); + const newText = text.replace(/([*_[\]()^`%\\~<>#|:.+\-])/g, '\\$1'); return { newText,