Archived
1
0
Fork 0

Do not output HTML on empty descriptions

This commit is contained in:
Alexander Yakovlev 2019-04-26 16:30:31 +07:00
parent 1354563e97
commit 67e6392dd2
Signed by: oreolek
GPG key ID: 1CDC4B7820C93BD3

View file

@ -106,6 +106,8 @@ class Game {
$output .= " by *".trim($this->author)."*"; $output .= " by *".trim($this->author)."*";
} }
} }
$description = $this->getDescription();
if ($description !== '') {
if (FORMAT === 'MARKDOWN') { if (FORMAT === 'MARKDOWN') {
$output .= "\n\n > ".$converter->convert($this->getDescription(), 'html', 'markdown_github')."\n"; $output .= "\n\n > ".$converter->convert($this->getDescription(), 'html', 'markdown_github')."\n";
} }
@ -115,6 +117,7 @@ class Game {
if (FORMAT === 'MARKDOWN') { if (FORMAT === 'MARKDOWN') {
$output .= "\n"; $output .= "\n";
} }
}
if (FORMAT === 'HTML') { if (FORMAT === 'HTML') {
$output .= "</li>\n"; $output .= "</li>\n";
} }