From 3afad58a93903257e8e3cb0a7b90ff79212f46bd Mon Sep 17 00:00:00 2001 From: Richard van Velzen Date: Thu, 30 Jul 2015 15:57:18 +0200 Subject: [PATCH] Revert "Fix semicolon printing when restricting max line length" This reverts commit 170e8b519e64463a39d293480e52f97b64d8ab89. --- lib/output.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/output.js b/lib/output.js index 44d5df6e..1d67b1b9 100644 --- a/lib/output.js +++ b/lib/output.js @@ -161,8 +161,6 @@ function OutputStream(options) { str = String(str); var ch = str.charAt(0); if (might_need_semicolon) { - might_need_semicolon = false; - if ((!ch || ";}".indexOf(ch) < 0) && !/[;]$/.test(last)) { if (options.semicolons || requireSemicolonChars(ch)) { OUTPUT += ";"; @@ -173,14 +171,11 @@ function OutputStream(options) { current_pos++; current_line++; current_col = 0; - - // reset the semicolon flag, since we didn't print one now and - // might still have to later - might_need_semicolon = true; } if (!options.beautify) might_need_space = false; } + might_need_semicolon = false; } if (!options.beautify && options.preserve_line && stack[stack.length - 1]) { -- 2.34.1