summaryrefslogtreecommitdiffstats
path: root/src/Utils/Formatter.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utils/Formatter.php')
-rw-r--r--src/Utils/Formatter.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Utils/Formatter.php b/src/Utils/Formatter.php
index c111bc7..9926db1 100644
--- a/src/Utils/Formatter.php
+++ b/src/Utils/Formatter.php
@@ -340,6 +340,10 @@ class Formatter
$curr = $list->tokens[$list->idx];
if ($curr->type === Token::TYPE_WHITESPACE) {
+ // Keep linebreaks after comments
+ if (strpos($curr->token, "\n") !== false && $prev !== null && $prev->type === Token::TYPE_COMMENT) {
+ $lineEnded = true;
+ }
// Whitespaces are skipped because the formatter adds its own.
continue;
}