diff --git a/pdf-ui/package.json b/pdf-ui/package.json index 4718ecf..f52ceb4 100644 --- a/pdf-ui/package.json +++ b/pdf-ui/package.json @@ -1,6 +1,6 @@ { "name": "@intersect.mbo/pdf-ui", - "version": "0.4.0", + "version": "0.4.1", "description": "Proposal discussion ui", "main": "./src/index.js", "exports": { diff --git a/pdf-ui/src/components/MarkdownTextComponent/index.jsx b/pdf-ui/src/components/MarkdownTextComponent/index.jsx index 0aa629e..5c600ba 100644 --- a/pdf-ui/src/components/MarkdownTextComponent/index.jsx +++ b/pdf-ui/src/components/MarkdownTextComponent/index.jsx @@ -12,7 +12,7 @@ const removeMarkdown = (markdown) => { .replace(/`{1,2}([^`]+)`{1,2}/g, '$1') .replace(/^\s{0,3}>\s?/g, '') .replace(/^\s{1,3}([-*+]|\d+\.)\s+/g, '') - .replace(/^\#{1,6}\s+/g, '') + .replace(/^(\n)?\s{0,}#{1,6}\s*( (.+))? +#+$|^(\n)?\s{0,}#{1,6}\s*( (.+))?$/gm, '$1$3$4$6') .replace(/\n{2,}/g, '\n') .replace(/\\([\\`*{}\[\]()#+\-.!_>])/g, '$1'); };