diff --git a/src/Markdown/TypeBuilder.php b/src/Markdown/TypeBuilder.php index ca45b69..a8deabc 100644 --- a/src/Markdown/TypeBuilder.php +++ b/src/Markdown/TypeBuilder.php @@ -472,7 +472,14 @@ public function tableOfContents() private function description(Schema $schema) { - $res = str_replace("\n", " ", $schema->title . $schema->description); + $res = str_replace("\n", " ", trim($schema->title)); + if (trim($schema->description)) { + if ($res) { + $res .= ". "; + } + + $res .= str_replace("\n", " ", trim($schema->description)); + } if ($res) { return rtrim($res, '.') . '.'; }