{# BRANCHING #} {# The label class is added to style the heading consisting of an item and a caption #} {%- macro create_branch_heading(unit) -%} {%- set clean_item = unit.item|default('Container')|string -%} {%- if clean_item|is_hidden -%} {% if unit.caption -%} {{unit.caption}} {%- endif %} {%- else -%} {{clean_item}} {% if unit.caption -%} {{unit.caption}} {%- endif %} {# Using literal (instead of adding a css style) makes converting from html to text easier. #} {%- endif -%} {%- endmacro -%} {%- macro create_branch(unit) -%} {{ create_branch_heading(unit)}} {% if unit.content -%} {{unit.content|trim|safe|md_to_html }} {# Needs to be safe since some unit content may have html #} {%- endif %} {% if unit|is_par -%} {%- endif %} {%- endmacro -%} {%- macro create_branches(units) -%} {% if units -%}