From c7edc925999c0d2f99b2d4024e0443a9454989d4 Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Mon, 20 Jan 2025 17:07:54 -0800 Subject: [PATCH] Address review feedback, fix first line case in mapping offset --- source-map.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source-map.bs b/source-map.bs index 7efebab..095e1af 100644 --- a/source-map.bs +++ b/source-map.bs @@ -835,7 +835,7 @@ To decode an index source map given a [=string=]-keyed [=/map= 1. [=For each=] |mapping| of |decodedSection|'s [=decoded source map/mappings=]: 1. Let |offsetMapping| be a new [=decoded mapping=]. 1. Set |offsetMapping|'s [=decoded mapping/generatedLine=] to |mapping|'s [=decoded mapping/generatedLine=] + |offsetLine|. - 1. If |offsetMapping|'s [=decoded mapping/generatedLine=] is equal to 0, set |offsetMapping|'s [=decoded mapping/generatedColumn=] to |mapping|'s [=decoded mapping/generatedColumn=] + |offsetColumn|. + 1. If |mapping|'s [=decoded mapping/generatedLine=] is equal to 0, set |offsetMapping|'s [=decoded mapping/generatedColumn=] to |mapping|'s [=decoded mapping/generatedColumn=] + |offsetColumn|. 1. Otherwise, set |offsetMapping|'s [=decoded mapping/generatedColumn=] to |mapping|'s [=decoded mapping/generatedColumn=]. 1. Set |offsetMapping|'s [=decoded mapping/originalSource=] to |mapping|'s [=decoded mapping/originalSource=]. 1. Set |offsetMapping|'s [=decoded mapping/originalLine=] to |mapping|'s [=decoded mapping/originalLine=].