File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -1161,6 +1161,37 @@ test('markdown -> mdast', function (t) {
11611161 'should support normal markdown w/o jsx'
11621162 )
11631163
1164+ t . deepEqual (
1165+ removePosition (
1166+ fromMarkdown ( '<x><y>\n\nz\n\n</y></x>' , {
1167+ extensions : [ syntax ( { acorn : acorn } ) ] ,
1168+ mdastExtensions : [ mdxJsx . fromMarkdown ]
1169+ } ) ,
1170+ true
1171+ ) ,
1172+ {
1173+ type : 'root' ,
1174+ children : [
1175+ {
1176+ type : 'mdxJsxFlowElement' ,
1177+ name : 'x' ,
1178+ attributes : [ ] ,
1179+ children : [
1180+ {
1181+ type : 'mdxJsxFlowElement' ,
1182+ name : 'y' ,
1183+ attributes : [ ] ,
1184+ children : [
1185+ { type : 'paragraph' , children : [ { type : 'text' , value : 'z' } ] }
1186+ ]
1187+ }
1188+ ]
1189+ }
1190+ ]
1191+ } ,
1192+ 'should support multiple flow elements with their tags on the same line'
1193+ )
1194+
11641195 t . end ( )
11651196} )
11661197
You can’t perform that action at this time.
0 commit comments