From 56146d0a110a3f3de44c86fb868b34c71034bf06 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Wed, 12 Apr 2023 10:33:33 -0700 Subject: [PATCH] fix most tests --- src/compiler/compile/Component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts index e6caa7f109..ba0714e8fe 100644 --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -151,8 +151,10 @@ export default class Component { let location: { line: number, column: number } = locator(c); if (tracer) { location = originalPositionFor(tracer, location); + // originalPositionFor returns 0-based lines? + // https://github.com/jridgewell/trace-mapping/issues/27 + location.line += 1; } - location.line += 1; // make line one based return location; }; // styles