From b758c9cfe0bdee27969d51dd9eb5e6706c6c5b28 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Tue, 15 Sep 2020 01:35:59 +0300 Subject: [PATCH] Include stripMarkdown.ts Was originally supposed to be part of commit cb5723db7cfe7aa0222ea2cb6fcabb87caefa3ad --- backend/src/utils/stripMarkdown.ts | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 backend/src/utils/stripMarkdown.ts diff --git a/backend/src/utils/stripMarkdown.ts b/backend/src/utils/stripMarkdown.ts new file mode 100644 index 00000000..84361b18 --- /dev/null +++ b/backend/src/utils/stripMarkdown.ts @@ -0,0 +1,3 @@ +export function stripMarkdown(str) { + return str.replace(/[*_|~`]/g, ""); +}