{# Recursive macro to render a thread node and its children #} {% macro render_thread_node(node, depth=0, parent_anchor=None) %} {% set max_indent = 5 %} {% set indent_depth = [depth, max_indent] | min %} {% set current_anchor = get_anchor_id(node) %}