Do not output HTML on empty descriptions
This commit is contained in:
parent
1354563e97
commit
67e6392dd2
3
Game.php
3
Game.php
|
@ -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";
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue