We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9b6f46e + d32e695 commit ea182faCopy full SHA for ea182fa
src/robot.js
@@ -524,7 +524,7 @@ class Robot {
524
const body = fs.readFileSync(require.resolve(path), 'utf-8')
525
526
const useStrictHeaderRegex = /^["']use strict['"];?\s+/
527
- const lines = body.replace(useStrictHeaderRegex, '').split('\n')
+ const lines = body.replace(useStrictHeaderRegex, '').split(/(?:\n|\r\n|\r)/)
528
.reduce(toHeaderCommentBlock, {lines: [], isHeader: true}).lines
529
.filter(Boolean) // remove empty lines
530
let currentSection = null
0 commit comments