Ensure original data is shown when no matches are made

pull/2736/head
Bogdan 1 year ago
parent 4d7a762ee8
commit 22f92150c3

@ -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 <span className={className}>{markdownBlocks}</span>;

Loading…
Cancel
Save