Browse Source

Allowing foo in {{ foo . var }} to be a arity-1 function, so that F(var)
will be looked up.

Christian Sunesson 16 years ago
parent
commit
eb8fa3caf6
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/erlydtl/erlydtl_runtime.erl

+ 2 - 0
src/erlydtl/erlydtl_runtime.erl

@@ -2,6 +2,8 @@
 
 -compile(export_all).
 
+find_value(Key, Fun) when is_function(Fun, 1) ->
+    Fun(Key);
 find_value(Key, L) when is_list(L) ->
     proplists:get_value(Key, L);
 find_value(Key, {GBSize, GBData}) when is_integer(GBSize) ->