From 43acd6d7ea9e9d573c1c12ab1c717c8ae9f6bdad Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Mon, 11 Dec 2017 16:32:14 +1100 Subject: [PATCH] fix(docstrings): split on any newline --- src/robot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/robot.js b/src/robot.js index de7e77904..f6a93640e 100644 --- a/src/robot.js +++ b/src/robot.js @@ -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