We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent feb05c3 commit a41772bCopy full SHA for a41772b
app/Lio/Articles/ArticlePresenter.php
@@ -27,7 +27,11 @@ public function excerpt()
27
// kinda a mess but s'ok for now
28
$html = App::make('Lio\Markdown\HtmlMarkdownConvertor')->convertMarkdownToHtml($this->resource->content);
29
$text = strip_tags($html);
30
- list($excerpt, $dump) = explode("\n\n", $text);
+ if (false !== strpos($text, "\n\n")) {
31
+ list($excerpt, $dump) = explode("\n\n", $text);
32
+ } else {
33
+ $excerpt = $text;
34
+ }
35
return Str::words($excerpt, 200);
36
}
37
0 commit comments