Compare commits

...
5 Commits
Author SHA1 Message Date
Mike van Riel c999e7d32a Removed the prefixing slash in a class_exists call because the autoloader of Composer
dies on that occasionally.
2012-07-26 17:09:50 +02:00
Mike van Riel 2b05ea3221 Fixing the other RegExes as well since they were also not using the u modifier 2012-07-13 20:07:51 +02:00
Mike van Riel 33a2e55cbc Merge pull request #4 from rvanvelzen/master
Add the u modifier to the regexes used.
2012-07-13 10:28:21 -07:00
Richard van Velzen 3d97a72bac Merge branch 'master' of git://github.com/phpDocumentor/ReflectionDocBlock 2012-07-13 13:43:29 +02:00
Richard van Velzen 51210b581e Add the u modifier to the regexes used.
Without the u modifier, PCRE does not recognize Unicode sequences, which breaks certain cases.
2012-07-13 13:42:49 +02:00
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -99,7 +99,7 @@ class DocBlock implements \Reflector
{
$comment = trim(
preg_replace(
'#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]{0,1}(.*)?#', '$1', $comment
'#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]{0,1}(.*)?#u', '$1', $comment
)
);
@@ -133,7 +133,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
@@ -173,7 +173,7 @@ class DocBlock implements \Reflector
)
)?
(\s+ [\s\S]*)? # everything that follows
/', $comment, $matches
/u', $comment, $matches
);
array_shift($matches);
}
@@ -35,7 +35,7 @@ class LongDescription implements \Reflector
*/
public function __construct($content)
{
if (preg_match('/\{\@(.+?)\}/', $content, $matches)) {
if (preg_match('/\{\@(.+?)\}/u', $content, $matches)) {
array_shift($matches);
foreach ($matches as $tag) {
$this->tags[] = Tag::createInstance('@' . $tag);
@@ -78,7 +78,7 @@ class LongDescription implements \Reflector
);
}
if (class_exists('\dflydev\markdown\MarkdownExtraParser')) {
if (class_exists('dflydev\markdown\MarkdownExtraParser')) {
$md = new \dflydev\markdown\MarkdownExtraParser();
$result = $md->transformMarkdown($result);
}