<commit_before>/* This software is licensed under a BSD license; see the LICENSE file for details. */

function jsHTML(html) {
    if (typeof(html) == "string") {
        if (! (stringStartsWith("&", html) && stringEndsWith(";", html))) {
            return document.createTextNode(html);
        }
        else {
            // Bit of a hack -- haven't been able to find a proper DOM way to do this.
            if (! html.match(/^&\s*(?:(?:[a-zA-Z]+)|(?:#\d+))\s*;$/)) {
                assert(false, "Bad entity: '" + html + "'.");
            }
            var s = document.createElement("span");
            s.innerHTML = html;
            return s;
        }
    }

    assert_is_arraylike(html, "Bad jsHTML.");
    assert(html.length > 0, "Bad jsHTML");
    var elem;
    if (typeof(html[0]) == "string") {
        elem = document.createElement(html[0]);
    }
    else {
        assert((!(html[0].length === undefined)) &&
               (html[0].length == 1 || html[0].length == 2),
               "Bad jsHTML.");
        elem = document.createElement(html[0][0]);
        if (html[0].length == 2) {
            for (var k in html[0][1]) {
                elem.setAttribute(k, html[0][1][k]);
            }<commit_msg>Trivial change to assert error.<commit_after>/* This software is licensed under a BSD license; see the LICENSE file for details. */

function jsHTML(html) {
    if (typeof(html) == "string") {
        if (! (stringStartsWith("&", html) && stringEndsWith(";", html))) {
            return document.createTextNode(html);
        }
        else {
            // Bit of a hack -- haven't been able to find a proper DOM way to do this.
            if (! html.match(/^&\s*(?:(?:[a-zA-Z]+)|(?:#\d+))\s*;$/)) {
                assert(false, "Bad entity: '" + html + "'.");
            }
            var s = document.createElement("span");
            s.innerHTML = html;
            return s;
        }
    }

    assert_is_arraylike(html, "Bad jsHTML.");
    assert(html.length > 0, "Bad jsHTML.");
    var elem;
    if (typeof(html[0]) == "string") {
        elem = document.createElement(html[0]);
    }
    else {
        assert((!(html[0].length === undefined)) &&
               (html[0].length == 1 || html[0].length == 2),
               "Bad jsHTML.");
        elem = document.createElement(html[0][0]);
        if (html[0].length == 2) {
            for (var k in html[0][1]) {
                elem.setAttribute(k, html[0][1][k]);
            }
{'fraction_non_alphanumeric': 0.18277395875454913, 'fraction_numerical': 0.01293974929235746, 'mean_word_length': 1.873403019744483, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4170819', 'n_tokens_mistral': 754, 'n_tokens_neox': 738, 'n_words': 188}