Permalink
Browse files

Rtrimmed truncated value.

  • Loading branch information...
1 parent feb6d3f commit d67bc7e69788795d7905b52d31188bbc1d390e01 @umpirsky umpirsky committed Jun 27, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Twig/Extensions/Extension/Text.php
@@ -59,7 +59,7 @@ function twig_truncate_filter(Twig_Environment $env, $value, $length = 30, $pres
}
}
- return mb_substr($value, 0, $length, $env->getCharset()) . $separator;
+ return rtrim(mb_substr($value, 0, $length, $env->getCharset())) . $separator;
}
return $value;
@@ -96,7 +96,7 @@ function twig_truncate_filter(Twig_Environment $env, $value, $length = 30, $pres
}
}
- return substr($value, 0, $length) . $separator;
+ return rtrim(substr($value, 0, $length)) . $separator;
}
return $value;

0 comments on commit d67bc7e

Please sign in to comment.