From a7b3df8c5bb07ae4aaa0767b80f20e3e1f61a7d7 Mon Sep 17 00:00:00 2001 From: Richard van Velzen Date: Fri, 13 Jul 2012 13:42:49 +0200 Subject: [PATCH] Add the u modifier to the regexes used. Without the u modifier, PCRE does not recognize Unicode sequences, which breaks certain cases. --- src/phpDocumentor/Reflection/DocBlock.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/phpDocumentor/Reflection/DocBlock.php b/src/phpDocumentor/Reflection/DocBlock.php index 9d5cfb6..2fea2dc 100644 --- a/src/phpDocumentor/Reflection/DocBlock.php +++ b/src/phpDocumentor/Reflection/DocBlock.php @@ -108,7 +108,7 @@ class DocBlock implements \Reflector } else { // clears all extra horizontal whitespace from the line endings // to prevent parsing issues - $comment = preg_replace('~(?m)\h*$~', '', $comment); + $comment = preg_replace('~(?m)\h*$~u', '', $comment); /* * Splits the docblock into a short description, long description and @@ -148,7 +148,7 @@ class DocBlock implements \Reflector ) )? (\s+ [\s\S]*)? # everything that follows - /', $comment, $matches + /u', $comment, $matches ); array_shift($matches); }