Skip to content

Commit

Permalink
Make "column" definition a partial sentence (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Dec 6, 2024
1 parent 6a0ba67 commit 8ca2ef3
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions source-map.bs
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ Terms and definitions {#terminology}
For the purposes of this document, the following terms and definitions apply.

: <dfn>Generated Code</dfn>
:: The code which is generated by the compiler or transpiler.
:: code which is generated by the compiler or transpiler.
: <dfn>Original Source</dfn>
:: The source code which has not been passed through the compiler.
:: source code which has not been passed through the compiler.
: <dfn>Base64 VLQ</dfn> [[VLQ]]
:: A [[base64]] value, where the most significant bit (the 6th bit) is used as the continuation bit,
and the "digits" are encoded into the string least significant first, and where the least
Expand All @@ -309,15 +309,15 @@ For the purposes of this document, the following terms and definitions apply.
The decoding of this VLQ string is the number -10.
</div>
: <dfn>Source Mapping URL</dfn>
:: The URL referencing the location of a source map from the [=Generated code=].
:: URL referencing the location of a source map from the [=Generated code=].
: <dfn>Column</dfn>
:: The zero-based indexed offset within a line of the generated code. How this offset is
measured can depend on the content type. For JavaScript and CSS based source
maps, they are defined to be in UTF-16 code units analogous to JavaScript string indices. That means
that "A" (`LATIN CAPITAL LETTER A`) measures as 1 code unit, and "🔥" (`FIRE`) measures as 2 code
units. For WebAssembly, columns are defined as byte offsets from the beginning of the binary
content (and there is only one group representing a line). Source maps for other content types
may diverge from this.
:: zero-based indexed offset within a line of the generated code, computed as
UTF-16 code units for JavaScript and CSS source maps, and as byte indexes in
the binary content (represented as a single line) for WebAssembly source maps.

Note: That means that "A" (`LATIN CAPITAL LETTER A`) measures as 1 code unit,
and "🔥" (`FIRE`) measures as 2 code units. Source maps for other content types
may diverge from this.

Source Map Format {#source-map-format}
======================================
Expand Down

0 comments on commit 8ca2ef3

Please sign in to comment.