@gendive/chatllm 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react/index.js
CHANGED
|
@@ -5086,7 +5086,10 @@ var MarkdownRenderer = ({
|
|
|
5086
5086
|
processedContent = processedContent.replace(UNCLOSED_POLL_TAG_REGEX, "");
|
|
5087
5087
|
processedContent = processedContent.replace(UNCLOSED_SKILL_TAG_REGEX, "");
|
|
5088
5088
|
const codeBlocks = [];
|
|
5089
|
-
processedContent = processedContent.replace(CODE_BLOCK_REGEX, (
|
|
5089
|
+
processedContent = processedContent.replace(CODE_BLOCK_REGEX, (match, lang, code) => {
|
|
5090
|
+
if (lang === "markdown" && TABLE_ROW_REGEX.test(code.trim().split("\n")[0])) {
|
|
5091
|
+
return code;
|
|
5092
|
+
}
|
|
5090
5093
|
codeBlocks.push({ language: lang || "", code });
|
|
5091
5094
|
return `\xA7CODEBLOCK\xA7${codeBlocks.length - 1}\xA7/CODEBLOCK\xA7`;
|
|
5092
5095
|
});
|