Remove unnecessary repeated definitions of the cleanup macro
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
>
|
||||
{# Kallen School Status #}
|
||||
{%- macro getReport() -%}
|
||||
{% from 'formatting.jinja' import cleanup %}
|
||||
{% from 'time.jinja' import input_datetime_read %}
|
||||
<p>
|
||||
"Hello Collin, "
|
||||
@ -27,17 +28,4 @@
|
||||
</p>
|
||||
|
||||
{%- endmacro -%}
|
||||
|
||||
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
||||
{%- macro cleanup(data) -%}
|
||||
{%- for item in data.split("\n") if item | trim != "" -%}
|
||||
{{ item | trim }} {% endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{# a macro to call all macros :) #}
|
||||
{%- macro mother_of_all_macros() -%}
|
||||
{{ getReport() }}
|
||||
{%- endmacro -%}
|
||||
|
||||
{# Call the macro #}
|
||||
{{- cleanup(mother_of_all_macros()) -}}
|
||||
{{- cleanup(getReport()) -}}
|
Reference in New Issue
Block a user