Skip to content

Commit

Permalink
Merge pull request #1602 from bolt/Allow-focus-parameter-for-excerpts…
Browse files Browse the repository at this point in the history
…-of-plain-strings

Allow "focus" parameter for excerpts of plain strings
  • Loading branch information
bobdenotter authored Jul 5, 2020
2 parents 1388e83 + a5a7254 commit 5aee375
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Twig/ContentExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public function getImage(?Content $content, bool $onlyValues = false)
public function getExcerpt($content, int $length = 280, bool $includeTitle = false, $focus = null): string
{
if (is_string($content) || $content instanceof Markup) {
return Excerpt::getExcerpt((string) $content, $length);
return Excerpt::getExcerpt((string) $content, $length, $focus);
}

if (ContentHelper::isSuitable($content, 'excerpt_format')) {
Expand Down

0 comments on commit 5aee375

Please sign in to comment.