@@ -350,6 +350,38 @@ Here is a paragraph with a [link](./foo)\`
350350 assert . notInclude ( result . content , 'Section content' )
351351 } )
352352
353+ test ( 'use h6 component to override h6 rendering' , async ( { assert } ) => {
354+ const edge = new Edge ( )
355+ edge . mount ( join ( import . meta. dirname , 'fixtures/views' ) )
356+ edge . use ( edgeMarkdown , { } )
357+
358+ const renderer = edge . share ( { } )
359+ const result = await renderer . getState ( ) . $markdown . render ( {
360+ content : dedent `
361+ ###### Section title
362+ ` ,
363+ } )
364+
365+ assert . include ( result . content , 'class="custom-h6"' )
366+ assert . notMatch ( result . content , / < h 6 (? ! c l a s s = " c u s t o m - h 6 " ) / )
367+ } )
368+
369+ test ( 'use h5 component saved as H5.edge to override h5 rendering' , async ( { assert } ) => {
370+ const edge = new Edge ( )
371+ edge . mount ( join ( import . meta. dirname , 'fixtures/views' ) )
372+ edge . use ( edgeMarkdown , { } )
373+
374+ const renderer = edge . share ( { } )
375+ const result = await renderer . getState ( ) . $markdown . render ( {
376+ content : dedent `
377+ ##### Section title
378+ ` ,
379+ } )
380+
381+ assert . include ( result . content , 'class="custom-h5"' )
382+ assert . notMatch ( result . content , / < h 5 (? ! c l a s s = " c u s t o m - h 5 " ) / )
383+ } )
384+
353385 test ( 'preview returns full content when there is no h2' , async ( { assert } ) => {
354386 const edge = new Edge ( )
355387 edge . mount ( join ( import . meta. dirname , 'fixtures/views' ) )
0 commit comments