mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-30 04:29:15 +01:00
Fix comment reformatting on Linux
Remove the use of \R (with BSR_ANYCRLF) at two places, as it was causing problems there.
This commit is contained in:
parent
cc4b8761e4
commit
dab2fd4b7a
@ -1,6 +1,9 @@
|
||||
Version 0.9.2-dev
|
||||
-----------------
|
||||
|
||||
* [BC] Due to the below changes nodes now optionally accept an `$attributes` array as the
|
||||
last parameter, instead of the previously used `$line` and `$docComment` parameters.
|
||||
|
||||
* Add mechanism for adding attributes to nodes in the lexer.
|
||||
|
||||
The following attributes are now added by default:
|
||||
|
@ -65,9 +65,7 @@ class PHPParser_Comment
|
||||
//
|
||||
// is handled by replacing the whitespace sequences before the * by a single space
|
||||
return preg_replace('(^\s+\*)m', ' *', $this->text);
|
||||
} elseif (preg_match('((*BSR_ANYCRLF)^/\*\*?\s\R)', $text)
|
||||
&& preg_match('((*BSR_ANYCRLF)\R(\s*)\*/$)', $text, $matches)
|
||||
) {
|
||||
} elseif (preg_match('(^/\*\*?\s*[\r\n])', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) {
|
||||
// Multi line comment of the type
|
||||
//
|
||||
// /*
|
||||
|
Loading…
Reference in New Issue
Block a user