<commit_before><div class="col-sm-3 col-md-2 quick-c-sidebar">
    <div class="aside-header">
        <h4>
            <strong>{{ 'CATEGORIES' | translate | uppercase }}</strong>
        </h4>
    </div>
    <div ui-tree="treeOptions" id="categories-tree" data-drag-enabled="false">
        <ul ui-tree-nodes ng-model="categories" class="nav">
            <li>
                <a href="" ui-sref="content.add({ type: 'category' })" class="btn-add">
                    {{ 'ADD_CATEGORY' | translate }} <i class="fa fa-fw fa-plus-circle"></i>
                </a>
            </li>
            <li ng-class="{ 'active': !activeNode}">
                <a href="" ui-sref="content.list({ contentId: null })" ng-click="uncategorized()">
                    {{ 'UNCATEGORIZED' | translate }}
                </a>
            </li>
            <li ng-repeat="category in categories"
                ng-class="{ 'active': (activeNode | nodeInPath:category.id) , 'open': !collapsed }"
                ui-tree-node ng-include="'treeChildrenRenderer.html'"
                data-collapsed="!{{ activeNode | nodeInPath:category.id  }}">
            </li>
        </ul>
    </div>
</div>

<!--TEMPLATE-->
<script type="text/ng-template" id="treeChildrenRenderer.html">
    <div ui-tree-handle>
        <a href="" ui-sref="content.list({ contentId: category.id })" ng-click="this.toggle()">
            <i class="fa fa-fw pull-right" ng-class="{'fa-angle-right': collapsed, 'fa-angle-down': !collapsed }"></i>
            {{ category.translations | getTranslation:listLang.code:'title' }}
                <span ng-hide="(category.translations | getTranslation:listLang.code:'title')">
                    {{ 'NO_TRANSLATION' | translate }}
                </span>
        </a>
    </div>
    <ul ui-tree-nodes="treeOptions" ng-model="category.children" ng-class="{ hidden: collapsed }">
        <li>
            <a href="" ui-sref="content.add({ type: 'category' })" class="btn-add">
                {{ 'ADD_CATEGORY' | translate }} <i class="fa fa-fw fa-plus-circle"></i>
            </a>
        </li>
        <li ng-repeat="category in category.children"
            ng-class="{ 'active': (activeNode | nodeInPath:category.id), 'open': !collapsed }"
            ui-tree-node ng-include="'treeChildrenRenderer.html'"
            data-collapsed="!{{ activeNode | nodeInPath:category.id  }}">
        </li>
    </ul>
</script>
<commit_msg>Categories  ng-repeat track by category.id<commit_after><div class="col-sm-3 col-md-2 quick-c-sidebar">
    <div class="aside-header">
        <h4>
            <strong>{{ 'CATEGORIES' | translate | uppercase }}</strong>
        </h4>
    </div>
    <div ui-tree="treeOptions" id="categories-tree" data-drag-enabled="false">
        <ul ui-tree-nodes ng-model="categories" class="nav">
            <li>
                <a href="" ui-sref="content.add({ type: 'category' })" class="btn-add">
                    {{ 'ADD_CATEGORY' | translate }} <i class="fa fa-fw fa-plus-circle"></i>
                </a>
            </li>
            <li ng-class="{ 'active': !activeNode}">
                <a href="" ui-sref="content.list({ contentId: null })" ng-click="uncategorized()">
                    {{ 'UNCATEGORIZED' | translate }}
                </a>
            </li>
            <li ng-repeat="category in categories track by category.id"
                ng-class="{ 'active': (activeNode | nodeInPath:category.id) , 'open': !collapsed }"
                ui-tree-node ng-include="'treeChildrenRenderer.html'"
                data-collapsed="!{{ activeNode | nodeInPath:category.id  }}">
            </li>
        </ul>
    </div>
</div>

<!--TEMPLATE-->
<script type="text/ng-template" id="treeChildrenRenderer.html">
    <div ui-tree-handle>
        <a href="" ui-sref="content.list({ contentId: category.id })" ng-click="this.toggle()">
            <i class="fa fa-fw pull-right" ng-class="{'fa-angle-right': collapsed, 'fa-angle-down': !collapsed }"></i>
            {{ category.translations | getTranslation:listLang.code:'title' }}
                <span ng-hide="(category.translations | getTranslation:listLang.code:'title')">
                    {{ 'NO_TRANSLATION' | translate }}
                </span>
        </a>
    </div>
    <ul ui-tree-nodes="treeOptions" ng-model="category.children" ng-class="{ hidden: collapsed }">
        <li>
            <a href="" ui-sref="content.add({ type: 'category' })" class="btn-add">
                {{ 'ADD_CATEGORY' | translate }} <i class="fa fa-fw fa-plus-circle"></i>
            </a>
        </li>
        <li ng-repeat="category in category.children track by category.id"
            ng-class="{ 'active': (activeNode | nodeInPath:category.id), 'open': !collapsed }"
            ui-tree-node ng-include="'treeChildrenRenderer.html'"
            data-collapsed="!{{ activeNode | nodeInPath:category.id  }}">
        </li>
    </ul>
</script>

{'fraction_non_alphanumeric': 0.18573460678723835, 'fraction_numerical': 0.001625685836212152, 'mean_word_length': 2.135031847133758, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 93, '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': '1195873', 'n_tokens_mistral': 1551, 'n_tokens_neox': 1503, 'n_words': 290}