maizzle / framework

Quickly build HTML emails with Tailwind CSS.
https://maizzle.com
MIT License
1.24k stars 49 forks source link

refactor: render original reference when a variable is undefined #1200

Closed cossssmin closed 8 months ago

cossssmin commented 8 months ago

This PR changes the default handling of undefined expressions so that the original reference is rendered in the compiled HTML, instead of the string undefined.

This is particularly useful when dealing with ESP placeholders/merge tags, meaning that you can now just do this:

<a href="{{ unsubscribe_url }}">Unsubscribe</a> from these emails.

... and have it output exactly like that - no need to ignore the expression with @{{ unsubscribe_url }}.