Skip to content

Commit 8980197

Browse files
committed
fix: jsx self-closing tags handle, closes #51
1 parent 63d3655 commit 8980197

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/compiler/template.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export async function compileSFCTemplate(
7171
))
7272
return
7373

74-
const insertPosition = node.openingElement.end - 1
74+
const insertPosition = node.openingElement.end - (node.openingElement.selfClosing ? 2 : 1)
7575
const { line, column } = node.loc.start
7676

7777
const content = ` ${KEY_DATA}="${relativePath}:${line}:${column}"`

0 commit comments

Comments
 (0)