From 09f8c6865fb9a7e239cc907e313db44cccb7b5e8 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 5 Apr 2020 21:57:13 +0300 Subject: feat: Paragraph -> Text, parse selfClosingHtml --- src/lib/Markdown/Text.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/lib/Markdown/Text.tsx (limited to 'src/lib/Markdown/Text.tsx') 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 = ({ line }) => { + return <>{line.split(splitter).map(span => )}; +} + +export default Text; + -- cgit v1.2.3 From 828946eb02bdfaa7ec5631f1e854881f874f7b7e Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 5 Apr 2020 22:06:54 +0300 Subject: refactor: rename InlineSyntax -> SyntacticSpan --- src/lib/Markdown/Text.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/lib/Markdown/Text.tsx') diff --git a/src/lib/Markdown/Text.tsx b/src/lib/Markdown/Text.tsx index b989476..e287dee 100644 --- a/src/lib/Markdown/Text.tsx +++ b/src/lib/Markdown/Text.tsx @@ -1,9 +1,12 @@ import React from 'react'; -import { InlineParserPropTypes } from './types'; -import InlineSyntax, { splitter } from './InlineSyntax'; +import SyntacticSpan, { splitter } from './SyntacticSpan'; -const Text: React.FC = ({ line }) => { - return <>{line.split(splitter).map(span => )}; +interface PropTypes { + line: string; +} + +const Text: React.FC = ({ line }) => { + return <>{line.split(splitter).map(span => )}; } export default Text; -- cgit v1.2.3