From 22f92150c3cf44d4a559284cf583f9ba541aa1a5 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Sat, 29 Jul 2023 18:30:27 +0300 Subject: [PATCH] Ensure original data is shown when no matches are made --- frontend/src/Components/Markdown/InlineMarkdown.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/Components/Markdown/InlineMarkdown.js b/frontend/src/Components/Markdown/InlineMarkdown.js index a9f04dc0e..082f0bb88 100644 --- a/frontend/src/Components/Markdown/InlineMarkdown.js +++ b/frontend/src/Components/Markdown/InlineMarkdown.js @@ -54,6 +54,10 @@ class InlineMarkdown extends Component { if (endIndex !== data.length && markdownBlocks.length > 0 && matchedCode) { markdownBlocks.push(data.substr(endIndex, data.length - endIndex)); } + + if (markdownBlocks.length === 0) { + markdownBlocks.push(data); + } } return {markdownBlocks};