File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
packages/svelte/src/compiler/phases/1-parse/state Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -504,8 +504,24 @@ function read_attribute(parser) {
504504 let value = true ;
505505 if ( parser . eat ( '=' ) ) {
506506 parser . allow_whitespace ( ) ;
507- value = read_attribute_value ( parser ) ;
508- end = parser . index ;
507+
508+ if ( parser . template [ parser . index ] === '/' ) {
509+ const char_start = parser . index ;
510+ parser . index ++ ; // consume '/'
511+ value = [
512+ {
513+ start : char_start ,
514+ end : char_start + 1 ,
515+ type : 'Text' ,
516+ raw : '/' ,
517+ data : '/'
518+ }
519+ ] ;
520+ end = parser . index ;
521+ } else {
522+ value = read_attribute_value ( parser ) ;
523+ end = parser . index ;
524+ }
509525 } else if ( parser . match_regex ( regex_starts_with_quote_characters ) ) {
510526 e . expected_token ( parser . index , '=' ) ;
511527 }
You can’t perform that action at this time.
0 commit comments