Skip to content

Commit 2f6ad50

Browse files
authored
Improve Markdown description formatting (#56)
1 parent df2abc9 commit 2f6ad50

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Markdown/TypeBuilder.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,14 @@ public function tableOfContents()
472472

473473
private function description(Schema $schema)
474474
{
475-
$res = str_replace("\n", " ", $schema->title . $schema->description);
475+
$res = str_replace("\n", " ", trim($schema->title));
476+
if (trim($schema->description)) {
477+
if ($res) {
478+
$res .= ". ";
479+
}
480+
481+
$res .= str_replace("\n", " ", trim($schema->description));
482+
}
476483
if ($res) {
477484
return rtrim($res, '.') . '.';
478485
}

0 commit comments

Comments
 (0)