evanw/node-source-map-support — pull request #2 by bpytlik (2013-03-04 23:53:33+00:00)
Title: fix compatibility with coffeescript 1.6 source map files

CoffeeScript 1.6 introduced builtin support for source map files. Unfortunately, they place the sourceMappiungURL comment at the top of the generated JS file, not the bottom. This means that the regexp in source-map-support.js on line 10 fails because it's not doing a multiline match.

For now, it assumes that the first comment it finds indicating a sourceMappingURL is the right one to use. I'm not certain what it should do if it finds multiple matches which disagree on the URL.

Thanks for considering this pull request.