Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make "column" definition a partial sentence #160

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions source-map.bs
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,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 @@ -324,15 +324,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
Loading