Skip to content

Commit

Permalink
Removed special case for tuples passed to truncatewords/2.
Browse files Browse the repository at this point in the history
  • Loading branch information
runejuhl committed Aug 20, 2012
1 parent 31a5e46 commit 31788d1
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/erlydtl_filters.erl
Original file line number Diff line number Diff line change
Expand Up @@ -808,9 +808,6 @@ truncatechars(Input, Max) ->
truncatechars(Input, Max, []).
%% @doc Truncates a string after a certain number of words.
%% Do not truncate tuples, e.g. a timestamp ({{Y,M,D},{H,Mm,S}}).
truncatewords(Input, _) when is_tuple(Input) ->
Input;
truncatewords(_Input, Max) when Max =< 0 ->
"";
truncatewords(Input, Max) when is_binary(Input) ->
Expand Down

0 comments on commit 31788d1

Please sign in to comment.