From a35cdfebf2d8c53c77900fee0826d4a967290e5d Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Sun, 5 Apr 2020 01:01:30 +0300
Subject: feat: add Paragraph component

---
 src/lib/Markdown/Content.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/lib/Markdown/Content.tsx')

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 (
-- 
cgit v1.2.3

