Permalink
Browse files

fixed indentation

  • Loading branch information...
1 parent eba4f5d commit acdf808cd6b0f4a56affd2fc134c76dd9c3df2ee @qpleple qpleple committed Sep 29, 2011
Showing with 17 additions and 17 deletions.
  1. +17 −17 lib/Twig/Extensions/Extension/Text.php
@@ -82,23 +82,23 @@ function twig_wordwrap_filter(Twig_Environment $env, $value, $length = 80, $sepa
return implode($separator, $sentences);
}
} else {
- function twig_truncate_filter(Twig_Environment $env, $value, $length = 30, $preserve = false, $separator = '...')
- {
- if (strlen($value) > $length) {
- if ($preserve) {
- if (false !== ($breakpoint = strpos($value, ' ', $length))) {
- $length = $breakpoint;
- }
- }
+ function twig_truncate_filter(Twig_Environment $env, $value, $length = 30, $preserve = false, $separator = '...')
+ {
+ if (strlen($value) > $length) {
+ if ($preserve) {
+ if (false !== ($breakpoint = strpos($value, ' ', $length))) {
+ $length = $breakpoint;
+ }
+ }
- return substr($value, 0, $length) . $separator;
- }
+ return substr($value, 0, $length) . $separator;
+ }
- return $value;
- }
+ return $value;
+ }
- function twig_wordwrap_filter(Twig_Environment $env, $value, $length = 80, $separator = "\n", $preserve = false)
- {
- return wordwrap($value, $length, $separator, !$preserve);
- }
-}
+ function twig_wordwrap_filter(Twig_Environment $env, $value, $length = 80, $separator = "\n", $preserve = false)
+ {
+ return wordwrap($value, $length, $separator, !$preserve);
+ }
+}

0 comments on commit acdf808

Please sign in to comment.