diff --git a/src/phpDocumentor/Reflection/DocBlock.php b/src/phpDocumentor/Reflection/DocBlock.php index 175a7dc..9d5cfb6 100644 --- a/src/phpDocumentor/Reflection/DocBlock.php +++ b/src/phpDocumentor/Reflection/DocBlock.php @@ -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.]+ )* \.? ) diff --git a/tests/phpDocumentor/Reflection/DocBlockTest.php b/tests/phpDocumentor/Reflection/DocBlockTest.php index 6cba432..b2a07ee 100644 --- a/tests/phpDocumentor/Reflection/DocBlockTest.php +++ b/tests/phpDocumentor/Reflection/DocBlockTest.php @@ -44,4 +44,22 @@ DOCBLOCK; $this->assertTrue($object->hasTag('see')); $this->assertTrue($object->hasTag('return')); } + + public function testDotSeperation() + { + $fixture = <<assertEquals( + 'This is a short description.', $object->getShortDescription() + ); + $this->assertEquals( + "This is a long description.\nThis is a continuation of the long description.", $object->getLongDescription()->getContents() + ); + } } +