Create text() macro, no more variable concatenation as render_text()!

This commit is contained in:
Son NK 2020-04-08 23:07:31 +02:00
parent a548c84694
commit 6a19390e3f
2 changed files with 6 additions and 1 deletions

View file

@ -2,6 +2,11 @@
<p style="font-size: 16px; line-height: 1.625; color: #51545E; margin: .4em 0 1.1875em;">{{ text }}</p>
{% endmacro %}
<!-- To be used instead of render_text, much better! -->
{% macro text() %}
<p style="font-size: 16px; line-height: 1.625; color: #51545E; margin: .4em 0 1.1875em;">{{ caller() }}</p>
{% endmacro %}
{% macro render_button(button_text, link) %}
<!-- Action -->
<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation"

View file

@ -1,4 +1,4 @@
{% from "_emailhelpers.html" import render_text, render_button, raw_url, grey_section %}
{% from "_emailhelpers.html" import render_text, text, render_button, raw_url, grey_section %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">