<commit_before>{% macro build_node(node, class="", style="", id="") %}
    <div id="{{id}}" style="{{style}}" class="list-group-item {%if request.path.startswith(node.get_absolute_url()) %}active {% else %} root-menu-item {% endif %} {{class}}">
    <a href="{{ node.get_absolute_url() }}">
       {{node.title}}
    </a>
    {{build_nodes(node)}}
    </div>
{% endmacro %}

{% macro build_nodes(parent=None, nodes=None) %}
     {% if not parent and nodes %}
      <div class="list-group">
        {% for node in nodes|selectattr("show_in_menu") %}
            {{ build_node(node, id="menu-%s" % node.id) }}
        {% endfor %}
      </div>
     {% elif parent %}

    {% for node in parent.get_children(show_in_menu=True) %}
       {{
       build_node(
           node,
           id="menu-%s" % node.id,
           class="menu-child {0} menu-{1}".format(
               ("hidden-menu" if not request.path.startswith(parent.get_absolute_url()) else ""),
               parent.id
           )
       )
       }}<commit_msg>Update _menu.html<commit_after>{% macro build_node(node, class="", style="", id="") %}
    <div id="{{id}}" style="{{style}}" class="{%if request.path.startswith(node.get_absolute_url()) %}active {% else %} root-menu-item {% endif %} {{class}}">
    <a href="{{ node.get_absolute_url() }}" class="list-group-item">
       {{node.title}}
    </a>
    {{build_nodes(node)}}
    </div>
{% endmacro %}

{% macro build_nodes(parent=None, nodes=None) %}
     {% if not parent and nodes %}
      <div class="list-group">
        {% for node in nodes|selectattr("show_in_menu") %}
            {{ build_node(node, id="menu-%s" % node.id) }}
        {% endfor %}
      </div>
     {% elif parent %}

    {% for node in parent.get_children(show_in_menu=True) %}
       {{
       build_node(
           node,
           id="menu-%s" % node.id,
           class="menu-child {0} menu-{1}".format(
               ("hidden-menu" if not request.path.startswith(parent.get_absolute_url()) else ""),
               parent.id
           ),
            style="margin-left:%s0px;" % node.get_ancestors_slugs()|length
       )
       }}
{'fraction_non_alphanumeric': 0.19878391019644528, 'fraction_numerical': 0.0023386342376052385, 'mean_word_length': 2.4278846153846154, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4141498', 'n_tokens_mistral': 738, 'n_tokens_neox': 687, 'n_words': 129}