demurgos / v8-coverage

Helpers to manipulate V8 coverage files
16 stars 6 forks source link

Fix ascii diagrams with Windows line-endings #7

Open demurgos opened 5 years ago

demurgos commented 5 years ago

@bcoe reported having issues on Windows due to the ascii range diagrams, possibly related to Windows line endings.

Some regexes are using dotAll mode (/s) when it's not needed, but I think that the core issue is related to how the lines are split. To mitigate the issue, I'll add an editorconfig file enforcing lf line endings, remove the extra /s and fix line splitting.

bcoe commented 5 years ago

@demurgos it wasn't ultimately a Windows issue, we had an older version of Node 8 in our Windows CI that I don't believe yet supported /s, just an FYI.

demurgos commented 5 years ago

Thanks for the clarification. I cleaned up the code slightly and found no link with line endings. Your explanation makes sense (I removed the dotAll flag).