Skip to content

Update erlydtl api #125

Closed
kaos opened this Issue Feb 6, 2014 · 0 comments

1 participant

@kaos
ErlyDTL member
kaos commented Feb 6, 2014

The api now looks at the file name / template and decides based on if it is a list or binary how to treat it. That can lead to subtle issues when for instance a file name is passed as a binary, or a verbatim template is passed as a list.

Add new compile_template and compile_file functions, and augment the existing compile functions to support wrapping the argument in a tuple, thus: {file, Filename} | {template, Template}.

This is a backwards compatible change.

@kaos kaos was assigned Feb 6, 2014
@kaos kaos added the fixed label Feb 17, 2014
@kaos kaos added a commit that closed this issue Feb 17, 2014
@kaos kaos Update api to be explicit about what to compile (fixes #125)
New api functions are erlydtl:compile_(file|template)/2,3.

The old versions are still around for backwards compatibility, with
support for `{file, Filename} | {template, Template}` to offer the
same level of explicity under a common function name.
aa23751
@kaos kaos closed this in aa23751 Feb 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.