From 9c781cacd60692af960d9734983346ecc9481a62 Mon Sep 17 00:00:00 2001 From: Cyril Sobierajewicz Date: Mon, 4 Mar 2019 17:48:28 +0100 Subject: Extract err locations from the format introduced in `purescript@0.12.2` See https://github.com/purescript/purescript/pull/3473. --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/index.js') diff --git a/src/index.js b/src/index.js index 8a2e468..28246e3 100644 --- a/src/index.js +++ b/src/index.js @@ -195,7 +195,7 @@ module.exports = function purescriptLoader(source, map) { const matchErrorsSeparator = /\n(?=Error)/; const errors = pscMessage.split(matchErrorsSeparator); for (const error of errors) { - const matchErrLocation = /at (.+\.purs) line (\d+), column (\d+) - line (\d+), column (\d+)/; + const matchErrLocation = /at (.+\.purs):(\d+):(\d+) - (\d+):(\d+) \(line \2, column \3 - line \4, column \5\)/; const [, filename] = matchErrLocation.exec(error) || []; if (!filename) continue; -- cgit v1.2.3