<commit_before>var loaderUtils = require("loader-utils");

module.exports = function (content) {
    this.cacheable && this.cacheable();

    var query = loaderUtils.parseQuery(this.query);
    var ngModule = query.module || 'ngTemplates';
    var relativeTo = query.relativeTo || '';
    var path = this.resource.slice(relativeTo.length); // get the base path
    var html = content.match(/^module\.exports/) ?
        content.substr(findQuote(content, false), findQuote(content, true)) :
        content;

    return "angular.module('" + ngModule + "').run(['$templateCache', function(c) { c.put('"+ path +"', " + html + ") }]);";

    function findQuote(content, backwards) {
        var i = backwards ? content.length - 1 : 0;
        while (i >= 0 && i < content.length) {
            if (content[i] == '"' || content[i] == "'") {<commit_msg>Fix for html loader with semi-color. fixes #1<commit_after>var loaderUtils = require("loader-utils");

module.exports = function (content) {
    this.cacheable && this.cacheable();

    var query = loaderUtils.parseQuery(this.query);
    var ngModule = query.module || 'ngTemplates';
    var relativeTo = query.relativeTo || '';
    var path = this.resource.slice(relativeTo.length); // get the base path
    var html;

    if (content.match(/^module\.exports/)) {
        var firstQuote = findQuote(content, false);
        var secondQuote = findQuote(content, true);
        html = content.substr(firstQuote, secondQuote - firstQuote + 1);
    } else {
        html = content;
    }

    return "angular.module('" + ngModule + "').run(['$templateCache', function(c) { c.put('"+ path +"', " + html + ") }]);";

    function findQuote(content, backwards) {
        var i = backwards ? content.length - 1 : 0;
        while (i >= 0 && i < content.length) {
            if (content[i] == '"' || content[i] == "'") {
{'fraction_non_alphanumeric': 0.17096774193548386, 'fraction_numerical': 0.004301075268817204, 'mean_word_length': 3.036876355748373, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2413880', 'n_tokens_mistral': 575, 'n_tokens_neox': 546, 'n_words': 135}