From c27a613647c06b1c234aae3d269aa1e1d012687f Mon Sep 17 00:00:00 2001 From: kyle Date: Tue, 6 Aug 2019 21:17:16 -0700 Subject: [PATCH] fix: remove problematic Markdown optimization (via #5520) --- src/core/components/providers/markdown.jsx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/core/components/providers/markdown.jsx b/src/core/components/providers/markdown.jsx index 69c5cc1d..d8d31a97 100644 --- a/src/core/components/providers/markdown.jsx +++ b/src/core/components/providers/markdown.jsx @@ -15,22 +15,11 @@ DomPurify.addHook("beforeSanitizeElements", function (current, ) { return current }) -// eslint-disable-next-line no-useless-escape -const isPlainText = (str) => /^[A-Z\s0-9!?\.]+$/gi.test(str) - function Markdown({ source, className = "" }) { if (typeof source !== "string") { return null } - if(isPlainText(source)) { - // If the source text is not Markdown, - // let's save some time and just render it. - return
- {source} -
- } - const md = new Remarkable({ html: true, typographer: true,