From 34113d1e1c94abb06c8784f10fc9f5edd519a1d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20Lind=C3=A9n?= Date: Wed, 8 May 2024 15:23:54 +0200 Subject: [PATCH] Reset end source range to global offset, not column --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index fbfbd25..e0e6c28 100644 --- a/src/index.ts +++ b/src/index.ts @@ -399,9 +399,9 @@ function tsPlugin(options?: { node: any, endLoc: Position = this.lastTokEndLoc ): void { - node.end = endLoc.column + node.end = endLoc.index node.loc.end = endLoc - if (this.options.ranges) node.range[1] = endLoc.column + if (this.options.ranges) node.range[1] = endLoc.index } startNodeAtNode(type: Node): any {