File tree Expand file tree Collapse file tree
transforms/angle-brackets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1001,3 +1001,25 @@ test('component-else', () => {
10011001 "
10021002 ` ) ;
10031003} ) ;
1004+
1005+ test ( 'hyphens with nested usage' , ( ) => {
1006+ let input = `
1007+ {{shared/documents-modal/-email-client}}
1008+ {{shared/-documents-modal/-email-client}}
1009+ {{-shared/-documents-modal/-email-client}}
1010+ {{-shared/documents-modal/-email-client}}
1011+ {{-shared/documents-modal/email-client}}
1012+ {{shared/-documents-modal/email-client}}
1013+ ` ;
1014+
1015+ expect ( runTest ( 'hyphens-everywhere.hbs' , input ) ) . toMatchInlineSnapshot ( `
1016+ "
1017+ <Shared::DocumentsModal::-EmailClient />
1018+ <Shared::-DocumentsModal::-EmailClient />
1019+ <-Shared::-DocumentsModal::-EmailClient />
1020+ <-Shared::DocumentsModal::-EmailClient />
1021+ <-Shared::DocumentsModal::EmailClient />
1022+ <Shared::-DocumentsModal::EmailClient />
1023+ "
1024+ ` ) ;
1025+ } ) ;
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ function capitalizedTagName(tagname) {
3535 return tagname
3636 . split ( '-' )
3737 . map ( s => {
38+ if ( ! s ) return '-' ;
3839 return s [ 0 ] . toUpperCase ( ) + s . slice ( 1 ) ;
3940 } )
4041 . join ( '' ) ;
You can’t perform that action at this time.
0 commit comments