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, }); }