<commit_before>smodules.template = (function() {
    var _filters = {};

    var _templates = {};

    var _isRemoteFile = function(templateSrc) {
        return templateSrc.match(/\.html$/);
    };

    var _isEmbedded = function(templateSrc) {
        return templateSrc.indexOf("#") === 0;
    };

    var _register = function(templateSrc, content) {
        _templates[templateSrc] = smodules.templateParser.parse(content, templateSrc);
    };

    var _registerFromRemote = function(templateSrc, callback) {
        $.ajax({
            url: templateSrc,
            success: function(response) {
                _register(templateSrc, response);
                if (typeof callback === "function") {
                    callback();
                }
            }
        });
    };

    var _registerFromHTML = function(templateSrc, callback) {<commit_msg>refactoring: smodules.template<commit_after>smodules.template = (function() {
    var _filters = {};

    var _templates = {};

    var _isRemoteFile = function(templateSrc) {
        return /\.html$/.test(templateSrc);
    };

    var _isEmbedded = function(templateSrc) {
        return templateSrc.indexOf("#") === 0;
    };

    var _register = function(templateSrc, content) {
        _templates[templateSrc] = smodules.templateParser.parse(content, templateSrc);
    };

    var _registerFromRemote = function(templateSrc, callback) {
        $.ajax({
            url: templateSrc,
            success: function(response) {
                _register(templateSrc, response);
                if (typeof callback === "function") {
                    callback();
                }
            }
        });
    };

    var _registerFromHTML = function(templateSrc, callback) {
{'fraction_non_alphanumeric': 0.12284730195177956, 'fraction_numerical': 0.001148105625717566, 'mean_word_length': 2.151898734177215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4790218', 'n_tokens_mistral': 475, 'n_tokens_neox': 448, 'n_words': 89}