{# A message written as plain text (DeferredMailer::send): its paragraphs, a line holding only a link as a link. #} {% extends 'email/layout.html.twig' %} {% block content %} {% for paragraph in text|trim|split("\n\n") %}

{%- for line in paragraph|split("\n") -%} {%- if line matches '{^https?://\\S+$}' -%} {{ line }} {%- else -%} {{ line }} {%- endif -%} {%- if not loop.last %}
{% endif -%} {%- endfor -%}

{% endfor %} {% endblock %}