diff --git a/assets/js/markdowntoolbar.ts b/assets/js/markdowntoolbar.ts index fd53c1b2..11af0b40 100644 --- a/assets/js/markdowntoolbar.ts +++ b/assets/js/markdowntoolbar.ts @@ -259,7 +259,7 @@ function escapeSelection(textarea: HTMLTextAreaElement, options: Partial#|:.+\-])/g, '\\$1'); + const newText = text.replace(/([*_[\]()^`%\\~<>#|:.+-])/g, '\\$1'); return { newText,