mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 10:07:12 +00:00
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:
@@ -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.]+
|
||||
)*
|
||||
\.?
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user