Skip to content

Commit 317a483

Browse files
authored
fix PrettyPrinter error (#65)
fix PrettyPrinter error
2 parents 7039bc6 + f5d19fb commit 317a483

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/parser/PrettyPrinter.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class PrettyPrinter extends Standard {
1111

12-
/**
12+
/**
1313
* Pretty prints an array of nodes (statements) and indents them optionally.
1414
*
1515
* @param Node[] $nodes Array of nodes
@@ -42,7 +42,7 @@ protected function pStmts(array $nodes, bool $indent = true): string {
4242
}
4343

4444
if ($indent) {
45-
return preg_replace('~\n(?!$|' . $this->noIndentToken . ')~', "\n ", $result);
45+
return preg_replace('~\n(?!$)~', "\n ", $result);
4646
} else {
4747
return $result;
4848
}

0 commit comments

Comments
 (0)