mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 11:44:14 +01:00
Merge pull request #3161 from rectorphp/fix-comment-removal
fix comment removal
This commit is contained in:
commit
d254821f7a
@ -366,7 +366,10 @@ final class BetterStandardPrinter extends Standard
|
||||
private function removeComments(string $printerNode): string
|
||||
{
|
||||
// remove /** ... */
|
||||
$printerNode = Strings::replace($printerNode, '#\/*\*(.*?)\*\/#');
|
||||
$printerNode = Strings::replace($printerNode, '#\/*\*(.*?)\*\/#s');
|
||||
|
||||
// remove /* ... */
|
||||
$printerNode = Strings::replace($printerNode, '#\/*\*(.*?)\*\/#s');
|
||||
|
||||
// remove # ...
|
||||
$printerNode = Strings::replace($printerNode, '#^(\s+)?\#(.*?)$#m');
|
||||
|
Loading…
x
Reference in New Issue
Block a user