diff --git a/src/utils.ts b/src/utils.ts index 1231d4ce..ed9d6391 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -573,8 +573,8 @@ export function isInAttribute(child: any, position: any, offset: number) { const startOffset = start.offset const match = child.loc.source.slice(child.tag.length + 1).match('>')! const endOffset = startOffset + match.index - const offset = getOffsetFromPosition(position)! - return (startOffset < offset) && (offset <= endOffset) + const _offset = getOffsetFromPosition(position)! + return (startOffset + offset < _offset) && (_offset <= endOffset + offset) } } }