No, it really does extend to the end of the line.
It can be a bit inconvenient if you're representing a range as a pair of
(line, column) positions. I found it easier to use the first column of the
next line as the ending position. (That is, include the newline character
in the range and consider the range to stop just before the second position
in the pair). The spec doesn't explicitly say whether the newline is
included, but it doesn't seem to matter in practice.
If you want to convert (line, column) pairs to byte offsets or determine
get the line endings.
On Fri, Jan 24, 2014 at 11:32 AM, Simon Lydell wrote:
> According to a comment in the source map spec by John Lenz (Oct 19,
> 2012), “the ending column is the start of the next segment **or the end
> of the line**” (emphasis mine). However, a source map can’t know where
> line endings are, can it? So shouldn’t that be "the ending column is the
> start of the next segment (or the end of the file)"?
> dev-js-sourcemap mailing list