Preserve newlines in docblock tags

This is especially important when using markdown.
Adding a blank line between text introduces a new paragraph.
Current implementation will result in all text staying in one paragraph
and also other elements like lists and code do not get recognized in
most cases.
This commit is contained in:
Carsten Brandt
2014-02-28 17:17:48 +01:00
parent 506de88c26
commit 4922a4a286
2 changed files with 7 additions and 7 deletions
@@ -14,6 +14,7 @@ namespace phpDocumentor\Reflection;
use phpDocumentor\Reflection\DocBlock\Context;
use phpDocumentor\Reflection\DocBlock\Location;
use phpDocumentor\Reflection\DocBlock\Tag\ReturnTag;
/**
* Test class for phpDocumentor\Reflection\DocBlock
@@ -272,7 +273,10 @@ DOCBLOCK;
*/
DOCBLOCK;
$object = new DocBlock($fixture);
$this->assertCount(1, $object->getTags());
$this->assertCount(1, $tags = $object->getTags());
/** @var ReturnTag $tag */
$tag = reset($tags);
$this->assertEquals("Content on\n multiple lines.\n\n One more, after the break.", $tag->getDescription());
}
/**