Skip to content

Commit 3d990a0

Browse files
committed
fix: improve handling of self-closing tags with unquoted attributes
1 parent 863232e commit 3d990a0

File tree

1 file changed

+1
-1
lines changed
  • packages/svelte/src/compiler/phases/1-parse/state

1 file changed

+1
-1
lines changed

packages/svelte/src/compiler/phases/1-parse/state/element.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ function read_attribute(parser) {
505505
if (parser.eat('=')) {
506506
parser.allow_whitespace();
507507

508-
if (parser.template[parser.index] === '/') {
508+
if (parser.template[parser.index] === '/' && parser.template[parser.index + 1] === '>') {
509509
const char_start = parser.index;
510510
parser.index++; // consume '/'
511511
value = [

0 commit comments

Comments
 (0)