From a0f63f3d0e1182138a092221d238e73fbc2046ff Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Wed, 20 Mar 2024 13:33:47 +0800 Subject: [PATCH] fix(typescript-plugin): fix html end tag mapping --- packages/typescript-plugin/lib/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typescript-plugin/lib/common.ts b/packages/typescript-plugin/lib/common.ts index 3018129505..31faaa3cf4 100644 --- a/packages/typescript-plugin/lib/common.ts +++ b/packages/typescript-plugin/lib/common.ts @@ -139,7 +139,7 @@ export function getComponentSpans( }); if (template.lang === 'html' && !node.isSelfClosing) { result.push({ - start: start + node.loc.source.lastIndexOf(node.tag), + start: node.loc.start.offset + node.loc.source.lastIndexOf(node.tag), length: node.tag.length, }); }