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,14 +106,17 @@ class Game {
$output .= " by *".trim($this->author)."*";
}
}
if (FORMAT === 'MARKDOWN') {
$output .= "\n\n > ".$converter->convert($this->getDescription(), 'html', 'markdown_github')."\n";
}
if (FORMAT === 'HTML') {
$output .= "\n<blockquote>".$this->getDescription()."</blockquote>\n";
}
if (FORMAT === 'MARKDOWN') {
$output .= "\n";
$description = $this->getDescription();
if ($description !== '') {
if (FORMAT === 'MARKDOWN') {
$output .= "\n\n > ".$converter->convert($this->getDescription(), 'html', 'markdown_github')."\n";
}
if (FORMAT === 'HTML') {
$output .= "\n<blockquote>".$this->getDescription()."</blockquote>\n";
}
if (FORMAT === 'MARKDOWN') {
$output .= "\n";
}
}
if (FORMAT === 'HTML') {
$output .= "</li>\n";