aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Markdown/Text.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-04-05 21:57:13 +0300
committereug-vs <eug-vs@keemail.me>2020-04-05 21:57:54 +0300
commit09f8c6865fb9a7e239cc907e313db44cccb7b5e8 (patch)
tree20bb8a8a8a373513b14151469111d4040f81f338 /src/lib/Markdown/Text.tsx
parent1f67a4e15b9ab10f8ecba2ee93e6a4c44e3c71ec (diff)
downloadreact-benzin-09f8c6865fb9a7e239cc907e313db44cccb7b5e8.tar.gz
feat: Paragraph -> Text, parse selfClosingHtml
Diffstat (limited to 'src/lib/Markdown/Text.tsx')
-rw-r--r--src/lib/Markdown/Text.tsx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/Markdown/Text.tsx b/src/lib/Markdown/Text.tsx
new file mode 100644
index 0000000..b989476
--- /dev/null
+++ b/src/lib/Markdown/Text.tsx
@@ -0,0 +1,10 @@
+import React from 'react';
+import { InlineParserPropTypes } from './types';
+import InlineSyntax, { splitter } from './InlineSyntax';
+
+const Text: React.FC<InlineParserPropTypes> = ({ line }) => {
+ return <>{line.split(splitter).map(span => <InlineSyntax line={span} />)}</>;
+}
+
+export default Text;
+