Commit 9b2e51d 1 parent 2533b69 commit 9b2e51d Copy full SHA for 9b2e51d
File tree 1 file changed +2
-4
lines changed
src/components/Widgets/Markdown/MarkdownControl/VisualEditor
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,7 @@ const Link = props => {
44
44
const title = data . get ( 'title' ) ;
45
45
const link = < a href = { url } title = { title } { ...props . attributes } > { props . children } </ a > ;
46
46
const result = ! marks ? link : marks . reduce ( ( acc , mark ) => {
47
- const MarkComponent = MARK_COMPONENTS [ mark . type ] ;
48
- return < MarkComponent > { acc } </ MarkComponent > ;
47
+ return renderMark ( { mark, children : acc } ) ;
49
48
} , link ) ;
50
49
return result ;
51
50
} ;
@@ -57,8 +56,7 @@ const Image = props => {
57
56
const alt = data . get ( 'alt' ) ;
58
57
const image = < img src = { url } title = { title } alt = { alt } { ...props . attributes } /> ;
59
58
const result = ! marks ? image : marks . reduce ( ( acc , mark ) => {
60
- const MarkComponent = MARK_COMPONENTS [ mark . type ] ;
61
- return < MarkComponent > { acc } </ MarkComponent > ;
59
+ return renderMark ( { mark, children : acc } ) ;
62
60
} , image ) ;
63
61
return result ;
64
62
} ;
You can’t perform that action at this time.
0 commit comments