mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f8cbd9ab6 | ||
|
|
a5b50ba482 |
@@ -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.]+
|
||||
)*
|
||||
\.?
|
||||
)
|
||||
|
||||
@@ -44,4 +44,22 @@ DOCBLOCK;
|
||||
$this->assertTrue($object->hasTag('see'));
|
||||
$this->assertTrue($object->hasTag('return'));
|
||||
}
|
||||
|
||||
public function testDotSeperation()
|
||||
{
|
||||
$fixture = <<<DOCBLOCK
|
||||
/**
|
||||
* This is a short description. This is a long description.
|
||||
* This is a continuation of the long description.
|
||||
*/
|
||||
DOCBLOCK;
|
||||
$object = new DocBlock($fixture);
|
||||
$this->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()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user