|
@@ -78,8 +78,8 @@ function foo ($bar) {}
|
|
|
$content = $annotation->getContent();
|
|
|
|
|
|
if (
|
|
|
- 1 !== Preg::match('/[.。]\h*$/u', $content)
|
|
|
- || 0 !== Preg::match('/[.。](?!\h*$)/u', $content, $matches)
|
|
|
+ 1 !== Preg::match('/[.。]\h*(\R|$)/u', $content)
|
|
|
+ || 0 !== Preg::match('/[.。](?!\h*(\R|$))/u', $content, $matches)
|
|
|
) {
|
|
|
continue;
|
|
|
}
|
|
@@ -92,9 +92,9 @@ function foo ($bar) {}
|
|
|
? sprintf('(?:%s\s+(?:\$\w+\s+)?)?', preg_quote(implode('|', $annotation->getTypes()), '/'))
|
|
|
: '';
|
|
|
$content = Preg::replaceCallback(
|
|
|
- '/^(\s*\*\s*@\w+\s+'.$optionalTypeRegEx.')(\p{Lu}?(?=\p{Ll}|\p{Zs}))(.*)$/',
|
|
|
+ '/^(\s*\*\s*@\w+\s+'.$optionalTypeRegEx.')(\p{Lu}?(?=\p{Ll}|\p{Zs}))(.*)(\R|$)/',
|
|
|
static function (array $matches) {
|
|
|
- return $matches[1].strtolower($matches[2]).$matches[3];
|
|
|
+ return $matches[1].strtolower($matches[2]).$matches[3].$matches[4];
|
|
|
},
|
|
|
$startLine->getContent(),
|
|
|
1
|