File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,28 +72,21 @@ export default function mdxToBlocks(ctx: Helix.UniversalContext) {
7272 continue ;
7373 }
7474
75- const isHorizontalLine = node . name === 'HorizontalLine' ;
76-
77- // These components does not a fallback repeat
78- const isDefaultNode = node . name === 'Fragment' || node . name === 'iframe' ;
79-
8075 // get slots
8176 const slotsAttr = getAttribute ( node , 'slots' ) ;
8277 const slotsValue = getAttributeValue ( slotsAttr , '' ) ;
8378 // if (!slotsValue) {
8479 // // TODO: throw error for invalid document
8580 // break;
8681 // }
87- const slots = isHorizontalLine
88- ? [ ]
89- : slotsValue
82+ const slots = slotsValue
9083 . split ( ',' )
9184 . map ( ( slot ) => slot . trim ( ) )
9285 . filter ( ( slot ) => slot . length > 0 ) ;
9386
9487 // repeat the block N times if repeat="N" is set
9588 const repeatAttr = getAttribute ( node , 'repeat' ) ;
96- const repeat = isDefaultNode ? 0 : parseInt ( getAttributeValue ( repeatAttr , '1' ) , 10 ) ;
89+ const repeat = parseInt ( getAttributeValue ( repeatAttr , '1' ) , 10 ) ;
9790
9891 // get variants as string
9992 const variantAttr = getAttribute ( node , 'variant' ) ;
You can’t perform that action at this time.
0 commit comments