Merge pull request #2 from bpytlik/master

fix compatibility with coffeescript 1.6 source map files
This commit is contained in:
Evan Wallace 2013-03-04 17:41:00 -08:00
commit 8717f4f66c

View File

@ -7,7 +7,7 @@ function mapSourcePosition(cache, position) {
if (!sourceMap && fs.existsSync(position.source)) {
// Get the URL of the source map
var fileData = fs.readFileSync(position.source, 'utf8');
var match = /\/\/@\s*sourceMappingURL=(.*)\s*$/.exec(fileData);
var match = /\/\/@\s*sourceMappingURL=(.*)\s*$/m.exec(fileData);
if (!match) return position;
var sourceMappingURL = match[1];