File tree Expand file tree Collapse file tree 2 files changed +34
-18
lines changed Expand file tree Collapse file tree 2 files changed +34
-18
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import Markdown from './markdown';
44
55const transformStringsIntoJSX = function ( strings ) {
66 return strings
7- . split ( ' ---' )
7+ . split ( / \n - - - \n / )
88 . map ( ( markdown , index ) => (
99 < Slide key = { `md-slide-${ index } ` } >
1010 < Markdown > { markdown } </ Markdown >
Original file line number Diff line number Diff line change @@ -14,6 +14,14 @@ import Quote from './quote';
1414import S from './s' ;
1515import Text from './text' ;
1616
17+ import Table from './table' ;
18+ import TableHeader from './table-header' ;
19+ import TableRow from './table-row' ;
20+ import TableHeaderItem from './table-header-item' ;
21+ import TableBody from './table-body' ;
22+ import TableItem from './table-item' ;
23+
24+
1725const _Heading = size => {
1826 const component = ( { children } ) => < Heading size = { size } > { children } </ Heading > ;
1927 component . propTypes = { children : PropTypes . node } ;
@@ -32,23 +40,31 @@ const _CombineBlockQuote = ({ children }) => (
3240_CombineBlockQuote . propTypes = { children : PropTypes . node } ;
3341
3442const compile = marksy ( {
35- a : Link ,
36- blockquote : _CombineBlockQuote ,
37- code : CodePane ,
38- del : _S ( 'strikethrough' ) ,
39- em : _S ( 'italic' ) ,
40- h1 : _Heading ( 1 ) ,
41- h2 : _Heading ( 2 ) ,
42- h3 : _Heading ( 3 ) ,
43- h4 : _Heading ( 4 ) ,
44- h5 : _Heading ( 5 ) ,
45- h6 : _Heading ( 6 ) ,
46- img : Image ,
47- codespan : Code ,
48- li : ListItem ,
49- p : Text ,
50- strong : _S ( 'bold' ) ,
51- ul : List ,
43+ elements : {
44+ a : Link ,
45+ blockquote : _CombineBlockQuote ,
46+ code : CodePane ,
47+ del : _S ( 'strikethrough' ) ,
48+ em : _S ( 'italic' ) ,
49+ h1 : _Heading ( 1 ) ,
50+ h2 : _Heading ( 2 ) ,
51+ h3 : _Heading ( 3 ) ,
52+ h4 : _Heading ( 4 ) ,
53+ h5 : _Heading ( 5 ) ,
54+ h6 : _Heading ( 6 ) ,
55+ img : Image ,
56+ codespan : Code ,
57+ li : ListItem ,
58+ p : Text ,
59+ strong : _S ( 'bold' ) ,
60+ ul : List ,
61+ table : Table ,
62+ thead : TableHeader ,
63+ th : TableHeaderItem ,
64+ tbody : TableBody ,
65+ tr : TableRow ,
66+ td : TableItem ,
67+ }
5268} ) ;
5369
5470export default class Markdown extends Component {
You can’t perform that action at this time.
0 commit comments