We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fb0cf7 commit 7973054Copy full SHA for 7973054
src/Utils/Formatter.php
@@ -340,6 +340,10 @@ public function formatList($list)
340
$curr = $list->tokens[$list->idx];
341
342
if ($curr->type === Token::TYPE_WHITESPACE) {
343
+ // Keep linebreaks after comments
344
+ if (strpos($curr->token, "\n") !== false && $prev !== null && $prev->type === Token::TYPE_COMMENT) {
345
+ $lineEnded = true;
346
+ }
347
// Whitespaces are skipped because the formatter adds its own.
348
continue;
349
}
0 commit comments