diff --git a/app/Gists/Gistlog.php b/app/Gists/Gistlog.php index e3af8025..3e79557e 100644 --- a/app/Gists/Gistlog.php +++ b/app/Gists/Gistlog.php @@ -95,6 +95,11 @@ public function isSecret() public function getPreview() { $body = strip_tags($this->renderHtml()); + + if (strlen($body) < 200) { + return $body; + } + return substr($body, 0, strpos($body, ' ', 200)); } }