Skip to content

Commit

Permalink
Fix for erlydtl dateformat call. It now takes a context as well for t…
Browse files Browse the repository at this point in the history
…he i18n support.
  • Loading branch information
mworrell committed Dec 6, 2009
1 parent 03a3d07 commit ee76c9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/erlydtl/erlydtl_compiler.erl
Expand Up @@ -1039,7 +1039,7 @@ trans_ext_ast(String, Args, Context, TreeWalker) ->



now_ast(FormatString, _Context, TreeWalker) ->
now_ast(FormatString, Context, TreeWalker) ->
% Note: we can't use unescape_string_literal here
% because we want to allow escaping in the format string.
% We only want to remove the surrounding escapes,
Expand All @@ -1048,7 +1048,7 @@ now_ast(FormatString, _Context, TreeWalker) ->
{{erl_syntax:application(
erl_syntax:atom(erlydtl_dateformat),
erl_syntax:atom(format),
[erl_syntax:string(UnescapeOuter)]),
[erl_syntax:string(UnescapeOuter), z_context_ast(Context)]),
#ast_info{}}, TreeWalker}.

unescape_string_literal(String) ->
Expand Down

0 comments on commit ee76c9c

Please sign in to comment.