@@ -31,13 +31,13 @@ const inline = {
3131const addBreaklines = children => children . map ( child => [ child , < br /> ] ) ;
3232
3333const getList = ordered =>
34- ( children , depth , { keys } ) => (
34+ ( children , { depth, keys } ) => (
3535 < List key = { keys [ 0 ] } keys = { keys } depth = { depth } ordered = { ordered } >
3636 { children . map ( ( child , i ) => < li key = { keys [ i ] } > { child } </ li > ) }
3737 </ List >
3838 ) ;
3939
40- const getAtomic = ( children , _ , { data, keys } ) => data . map (
40+ const getAtomic = ( children , { data, keys } ) => data . map (
4141 ( item , i ) => < AtomicBlock key = { keys [ i ] } { ...data [ i ] } />
4242) ;
4343
@@ -47,17 +47,17 @@ const getAtomic = (children, _, { data, keys }) => data.map(
4747const blocks = {
4848 // Rendering blocks like this along with cleanup results in a single p tag for each paragraph
4949 // adding an empty block closes current paragraph and starts a new one
50- unstyled : ( children , _ , { keys } ) => < p key = { keys [ 0 ] } > { addBreaklines ( children ) } </ p > ,
50+ unstyled : ( children , { keys } ) => < p key = { keys [ 0 ] } > { addBreaklines ( children ) } </ p > ,
5151 atomic : getAtomic ,
5252 blockquote :
53- ( children , _ , { keys } ) => < blockquote key = { keys [ 0 ] } > { addBreaklines ( children ) } </ blockquote > ,
54- 'header-one' : ( children , _ , { keys } ) => children . map ( ( child , i ) => < h1 key = { keys [ i ] } > { child } </ h1 > ) ,
55- 'header-two' : ( children , _ , { keys } ) => children . map ( ( child , i ) => < h2 key = { keys [ i ] } > { child } </ h2 > ) ,
56- 'header-three' : ( children , _ , { keys } ) => children . map ( ( child , i ) => < h3 key = { keys [ i ] } > { child } </ h3 > ) ,
57- 'header-four' : ( children , _ , { keys } ) => children . map ( ( child , i ) => < h4 key = { keys [ i ] } > { child } </ h4 > ) ,
58- 'header-five' : ( children , _ , { keys } ) => children . map ( ( child , i ) => < h5 key = { keys [ i ] } > { child } </ h5 > ) ,
59- 'header-six' : ( children , _ , { keys } ) => children . map ( ( child , i ) => < h6 key = { keys [ i ] } > { child } </ h6 > ) ,
60- 'code-block' : ( children , _ , { keys } ) => < pre key = { keys [ 0 ] } style = { styles . codeBlock } > { addBreaklines ( children ) } </ pre > ,
53+ ( children , { keys } ) => < blockquote key = { keys [ 0 ] } > { addBreaklines ( children ) } </ blockquote > ,
54+ 'header-one' : ( children , { keys } ) => children . map ( ( child , i ) => < h1 key = { keys [ i ] } > { child } </ h1 > ) ,
55+ 'header-two' : ( children , { keys } ) => children . map ( ( child , i ) => < h2 key = { keys [ i ] } > { child } </ h2 > ) ,
56+ 'header-three' : ( children , { keys } ) => children . map ( ( child , i ) => < h3 key = { keys [ i ] } > { child } </ h3 > ) ,
57+ 'header-four' : ( children , { keys } ) => children . map ( ( child , i ) => < h4 key = { keys [ i ] } > { child } </ h4 > ) ,
58+ 'header-five' : ( children , { keys } ) => children . map ( ( child , i ) => < h5 key = { keys [ i ] } > { child } </ h5 > ) ,
59+ 'header-six' : ( children , { keys } ) => children . map ( ( child , i ) => < h6 key = { keys [ i ] } > { child } </ h6 > ) ,
60+ 'code-block' : ( children , { keys } ) => < pre key = { keys [ 0 ] } style = { styles . codeBlock } > { addBreaklines ( children ) } </ pre > ,
6161 'unordered-list-item' : getList ( ) ,
6262 'ordered-list-item' : getList ( true ) ,
6363} ;
0 commit comments