diff options
Diffstat (limited to 'src/lib/Markdown/Content.tsx')
-rw-r--r-- | src/lib/Markdown/Content.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/Markdown/Content.tsx b/src/lib/Markdown/Content.tsx index b7829ed..2a9e2ee 100644 --- a/src/lib/Markdown/Content.tsx +++ b/src/lib/Markdown/Content.tsx @@ -1,6 +1,7 @@ import React from 'react'; import CodeBlock from './CodeBlock'; +import Paragraph from './Paragraph'; import { ParserPropTypes } from './types'; @@ -16,10 +17,10 @@ const Content: React.FC<ParserPropTypes> = ({ rawLines }) => { let result; if (denotesCodeBlock(line)) { const closeIndex = rawLines.findIndex(line => denotesCodeBlock(line)); - const codeBlockLines = rawLines.splice(0, closeIndex); + const codeBlockLines = rawLines.splice(0, closeIndex + 1).slice(0, closeIndex); result = <CodeBlock rawLines={codeBlockLines} /> } else { - result = <p> {line} </p> + result = <Paragraph data={line} /> } return ( |