diff --git a/package-lock.json b/package-lock.json index 594eec74..f9e72a98 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.1.3", + "version": "1.1.3-beta-3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.1.3", + "version": "1.1.3-beta-3", "license": "ISC", "dependencies": { "@types/react-dates": "^21.8.6", diff --git a/package.json b/package.json index 1af37d23..c61b1090 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@devtron-labs/devtron-fe-common-lib", - "version": "1.1.3", + "version": "1.1.3-beta-3", "description": "Supporting common component library", "type": "module", "main": "dist/index.js", diff --git a/src/Common/Markdown/MarkDown.tsx b/src/Common/Markdown/MarkDown.tsx index 99e28958..ccd218be 100644 --- a/src/Common/Markdown/MarkDown.tsx +++ b/src/Common/Markdown/MarkDown.tsx @@ -37,6 +37,12 @@ const MarkDown = ({ setExpandableIcon, markdown, className, breaks, disableEscap getHeight() }, [markdown]) + const renderTableRow = (row: Tokens.TableCell[]) => ` + + ${row.map((rowCell) => `${marked(rowCell.text)}`).join('')} + + ` + renderer.listitem = ({ text, task, checked }: Tokens.ListItem) => { if (task) { if (checked) { @@ -56,14 +62,7 @@ const MarkDown = ({ setExpandableIcon, markdown, className, breaks, disableEscap renderer.image = ({ href, title, text }: Tokens.Image) => `${text}` - renderer.table = ({ header, rows }: Tokens.Table) => { - const renderTableRow = (row: Tokens.TableCell[]) => ` - - ${row.map((rowCell) => `${marked(rowCell.text)}`).join('')} - - ` - - return ` + renderer.table = ({ header, rows }: Tokens.Table) => `
@@ -75,7 +74,6 @@ const MarkDown = ({ setExpandableIcon, markdown, className, breaks, disableEscap
` - } renderer.heading = ({ text, depth }: Tokens.Heading) => { const escapedText = disableEscapedText ? '' : text.toLowerCase().replace(/[^\w]+/g, '-')