Remove unnecessary repeated definitions of the cleanup macro

This commit is contained in:
2023-07-01 14:08:40 -04:00
parent 1c51c678e5
commit 529b24e310
16 changed files with 152 additions and 315 deletions

View File

@ -1489,6 +1489,7 @@ script:
data:
who: '{{ who }}'
message: >-
{% from 'formatting.jinja' import cleanup %}
{% macro greeting() %}
<p>
{% if now().strftime('%H')|int < 12%}
@ -1783,14 +1784,6 @@ script:
] | random }}
{% endmacro %}
{# a macro that removes all newline characters, empty spaces, and returns formatted text. Also replaces all Underscores with Spaces #}
{%- macro cleanup(data) -%}
{%- for item in data.split("\n") if item | trim != "" -%}
{{ item | trim | replace("_", " ") }} {% endfor -%}
{%- endmacro -%}
{# ********************************************* #}
{# ******** Start the Speech routines ******** #}
{# ********************************************* #}