View Source MjmlEEx.Utils (MJML EEx v0.5.0)

General MJML EEx utils reside here for encoding and decoding Elixir expressions in MJML EEx templates.

Link to this section Summary

Functions

This function finds all of the instances of of encoded EEx expressions and decodes them so that when the EEx HTML template is finally rendered, the expressions are executed as expected.

This function encodes the internals of an MJML EEx document so that when it is compiled, the EEx expressions don't break the MJML compiler.

This function goes through and espaces all non-special EEx expressions so that they do not throw off the the MJML compiler.

Link to this section Functions

Link to this function

decode_eex_expressions(email_document)

View Source

This function finds all of the instances of of encoded EEx expressions and decodes them so that when the EEx HTML template is finally rendered, the expressions are executed as expected.

Link to this function

encode_expression(marker, expression)

View Source

This function encodes the internals of an MJML EEx document so that when it is compiled, the EEx expressions don't break the MJML compiler.

Link to this function

escape_eex_expressions(template)

View Source

This function goes through and espaces all non-special EEx expressions so that they do not throw off the the MJML compiler.