Fixed the case where the dot does not properly terminate the short description.

The regular expression only took into account newlines, not general whitespace after the dot. Added a test case as well.
This commit is contained in:
Richard van Velzen
2012-06-04 09:27:56 +02:00
parent b5b35d2690
commit e29bba03f6
2 changed files with 22 additions and 4 deletions
+4 -4
View File
@@ -127,11 +127,11 @@ class DocBlock implements \Reflector
preg_match(
'/(?x)
\A (
[^\n]+
[^\n.]+
(?:
(?! (?<=\.) \n | \n{2} ) # disallow the first seperator here
\n (?! [ \t]* @\pL ) # disallow second seperator
[^\n]+
(?! \. \s | \n{2} ) # disallow the first seperator here
[\n.] (?! [ \t]* @\pL ) # disallow second seperator
[^\n.]+
)*
\.?
)