<commit_before>{% spaceless %}
<ul class="pull-right nav">
    {% for item in menu.definition %}
        {% if not item.role|default or is_granted(item.role) %}
            {% if not item.not_role|default or not is_granted(item.not_role) %}
    <li class="{% if is_current_route(item.route) %}active{% endif %} {% if item.icon|default %}has-icon{% endif %}">
        {% set type = item.type|default('route') %}
        {% set route = type == 'route' ? item.route : 'page_or_post' %}
        {% set params = type == 'route' ? {} : { slug: item.route } %}
        <a href="{{ path(route, params) }}">
            {% if item.icon|default %}
            <i class="icon-{{ item.icon }}"></i>
            {% endif %}
            <span>{{ item.label }}</span>
        </a>
    </li>
            {% endif %}
        {% endif %}
    {% endfor %}
</ul>
{% endspaceless %}<commit_msg>Fixed issue with main nav not setting post items active<commit_after>{% spaceless %}
<ul class="pull-right nav">
    {% for item in menu.definition %}
        {% if not item.role|default or is_granted(item.role) %}
            {% if not item.not_role|default or not is_granted(item.not_role) %}
            {% set type = item.type|default('route') %}
            {% set route = type == 'route' ? item.route : 'page_or_post' %}
            {% set params = type == 'route' ? {} : { slug: item.route } %}
    <li class="{% if (type == 'route' and is_current_route(item.route)) or (type == 'page' and is_current_slug(item.route)) %}active{% endif %} {% if item.icon|default %}has-icon{% endif %}">
        <a href="{{ path(route, params) }}">
            {% if item.icon|default %}
            <i class="icon-{{ item.icon }}"></i>
            {% endif %}
            <span>{{ item.label }}</span>
        </a>
    </li>
            {% endif %}
        {% endif %}
    {% endfor %}
</ul>
{% endspaceless %}
{'fraction_non_alphanumeric': 0.19583778014941303, 'fraction_numerical': 0.0, 'mean_word_length': 2.260869565217391, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '2563393', 'n_tokens_mistral': 661, 'n_tokens_neox': 579, 'n_words': 149}