From c1cebced57ee6240069f9401d4016d613f84b0c5 Mon Sep 17 00:00:00 2001 From: exabugs Date: Wed, 30 Aug 2017 17:59:29 +0900 Subject: [PATCH] Fix: Error occurred when parts greater than 4. --- lib/lint-error.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/lint-error.js b/lib/lint-error.js index db7db18..da8870b 100644 --- a/lib/lint-error.js +++ b/lib/lint-error.js @@ -21,11 +21,11 @@ function LintError(line) { // hack to handle reasons like this: // "Blank line at the end of a code block. Is this needed?" - if (parts.length === 4) { + if (parts.length >= 4) { temp = []; temp.push(parts[0]); - temp.push([parts[1], parts[2]].join(' ')); - temp.push(parts[3]); + temp.push(parts.slice(1, parts.length - 1).join(' ')); + temp.push(parts[parts.length - 1]); parts = temp; }