Skip to content

Commit

Permalink
fix(docstrings): split on any newline
Browse files Browse the repository at this point in the history
  • Loading branch information
mistydemeo committed Aug 2, 2018
1 parent 350519d commit 43acd6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/robot.js
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ class Robot {
const body = fs.readFileSync(require.resolve(path), 'utf-8')

const useStrictHeaderRegex = /^["']use strict['"];?\s+/
const lines = body.replace(useStrictHeaderRegex, '').split('\n')
const lines = body.replace(useStrictHeaderRegex, '').split(/(?:\n|\r\n|\r)/)
.reduce(toHeaderCommentBlock, {lines: [], isHeader: true}).lines
.filter(Boolean) // remove empty lines
let currentSection = null
Expand Down

0 comments on commit 43acd6d

Please sign in to comment.