From:  richard.schneeman@gmail.com
Date:  13 Nov 2017 02:47:52 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.js-sourcemap
Subject:  

Getting line numbers from mappings

NNTP-Posting-Host:  63.245.214.181

I have a question when generating and reading mappings. In the v3 spec it says:

> The “mappings” data is broken down as follows: each group representing a line in the generated file is separated by a ”;”


Does this mean that the mapping should have the same number of semi-colons as lines and if it doesn't then it's a bug? Or are empty lines allowed to be omitted?

I'm asking because i'm trying to fix a piece of code that relies on this logic to concat source maps https://github.com/rails/sprockets/blob/341fed4f91e0dfd75f9740ee77885488db58aecd/lib/sprockets/source_map_utils.rb#L80

However it looks like coffeescript skips adding a mapping group for empty lines, so that technique is thrown off.

If empty lines can be omitted from mappings does anyone have another good way to concatenate source maps if the generated files are not available?