Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

fix: Custom markdown component regex fixed for code blocks (#1179)

Chandrasekharan M26572e5dd25a
diff --git a/frontend/src/components/helpers/custom-markdown/CustomMarkdown.jsx b/frontend/src/components/helpers/custom-markdown/CustomMarkdown.jsx
index 173d60a6e..24e0d9d60 100644
--- a/frontend/src/components/helpers/custom-markdown/CustomMarkdown.jsx
+++ b/frontend/src/components/helpers/custom-markdown/CustomMarkdown.jsx
@@ -21,7 +21,7 @@ const CustomMarkdown = ({
- New line: \n
*/
const patterns = [
- { type: "tripleCode", regex: /```([^`]{1,1000})```/g },
+ { type: "tripleCode", regex: /```\n([\s\S]*?)\n```/g },
{ type: "inlineCode", regex: /`([^`]{1,100})`/g },
{ type: "bold", regex: /\*\*([^*]{1,100})\*\*/g },
{ type: "link", regex: /\[([^\]]{1,100})\]\(([^)]{1,200})\)/g },