Skip to content

Commit c27a613

Browse files
authored
fix: remove problematic Markdown optimization (via #5520)
1 parent 1b0efbe commit c27a613

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/core/components/providers/markdown.jsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,11 @@ DomPurify.addHook("beforeSanitizeElements", function (current, ) {
1515
return current
1616
})
1717

18-
// eslint-disable-next-line no-useless-escape
19-
const isPlainText = (str) => /^[A-Z\s0-9!?\.]+$/gi.test(str)
20-
2118
function Markdown({ source, className = "" }) {
2219
if (typeof source !== "string") {
2320
return null
2421
}
2522

26-
if(isPlainText(source)) {
27-
// If the source text is not Markdown,
28-
// let's save some time and just render it.
29-
return <div className="markdown">
30-
{source}
31-
</div>
32-
}
33-
3423
const md = new Remarkable({
3524
html: true,
3625
typographer: true,

0 commit comments

Comments
 (0)