<commit_before>;(function(xin) {
    "use strict";

    var List = xin.ui.Outlet.extend({
        initialize: function(options) {
            this.$el.addClass('xin-list');

            this.app = options.app;

            if (this.collection) {
                var template,
                    $fetch;

                // template priority:
                // - options.template
                // - embedded html as template
                // - hardcoded template
                if (options.template) {
                    if (options.template.text) {
                        template = options.template.text;
                    } else {
                        this.itemTemplate = options.template;
                        this.itemAttributes = [];
                        this.itemTagName = 'li';
                    }
                } else {
                    template = xin.htmlDecode(this.$el.html());
                    if (!template) {
                        this.itemTemplate = _.template('<%= model %>');
                        this.itemAttributes = [];
                        this.itemTagName = 'li';
                    }
                }

                if (template) {
                    $fetch = xin.$(template);
                    this.itemAttributes = $fetch.attr();
                    this.itemTemplate = _.template(xin.htmlDecode($fetch.html()));
                    this.itemTagName = $fetch[0].tagName.toLowerCase();
                }

                this.itemAttributes['data-role'] = this.itemAttributes['data-role'] || 'list-item';

                this.listenTo(this.collection, 'reset', this.reset);
                this.listenTo(this.collection, 'sort', this.reset);
                this.listenTo(this.collection, 'add', this.add);
                this.listenTo(this.collection, 'remove', this.remove);

                this.reset();<commit_msg>List accept <template> or <script type="text/template"><commit_after>;(function(xin) {
    "use strict";

    var List = xin.ui.Outlet.extend({
        initialize: function(options) {
            this.$el.addClass('xin-list');

            this.app = options.app;

            if (this.collection) {
                var template,
                    $fetch;

                // template priority:
                // - options.template
                // - embedded html as template
                // - hardcoded template
                if (options.template) {
                    if (options.template.text) {
                        template = options.template.text;
                    } else {
                        this.itemTemplate = options.template;
                        this.itemAttributes = [];
                        this.itemTagName = 'li';
                    }
                } else {
                    var $template = this.$('>template');
                    if ($template.length <= 0) {
                        $template = this.$('>script[type=text/template]');
                    }

                    template = $template.html();
                    if (!template) {
                        this.itemTemplate = _.template('<%= model %>');
                        this.itemAttributes = [];
                        this.itemTagName = 'li';
                    }
                }

                if (template) {
                    $fetch = xin.$(template);
                    this.itemAttributes = $fetch.attr();
                    this.itemTemplate = _.template(xin.htmlDecode($fetch.html()));
                    this.itemTagName = $fetch[0].tagName.toLowerCase();
                }

                this.itemAttributes['data-role'] = this.itemAttributes['data-role'] || 'list-item';

                this.listenTo(this.collection, 'reset', this.reset);
                this.listenTo(this.collection, 'sort', this.reset);
                this.listenTo(this.collection, 'add', this.add);
                this.listenTo(this.collection, 'remove', this.remove);

                this.reset();
{'fraction_non_alphanumeric': 0.12316130640737971, 'fraction_numerical': 0.0007479431563201197, 'mean_word_length': 1.1420181526962092, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 9, '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': '1947142', 'n_tokens_mistral': 998, 'n_tokens_neox': 905, 'n_words': 160}