Skip to content

Commit

Permalink
fix: Line parsing now understands carriage returns
Browse files Browse the repository at this point in the history
If the parsed line had an \r in it, BRDA checking could fail trying to compare "-\r" == "-". This
fix escapes carriage returns in parsed lines.
  • Loading branch information
ritave authored and mweibel committed May 24, 2018
1 parent e83f3de commit 69e61f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -278,7 +278,7 @@ function parseBRDA (currentCoverageFile, prefixSplit) {
* @returns {CoverageFile[]}
*/
function processFile (data, lcov) {
var lines = data.split('\n')
var lines = data.split(/\r?\n/)
var currentCoverageFile = null

for (var i = 0, l = lines.length; i < l; i++) {
Expand Down

0 comments on commit 69e61f1

Please sign in to comment.