<commit_before>"use strict";

// https://github.com/umdjs/umd
(function (root, factory) {
    if (typeof define === 'function' && define.amd) {
        // AMD. Register as an anonymous module.
        define(factory);
    } else if (typeof exports === 'object') {
        // Node. Does not work with strict CommonJS
        module.exports = factory;
    } else {
        // Browser globals with support for web workers (root is window)

        root.document.addEventListener("DOMContentLoaded", function() {

            function getFile(query) {
                var file = query.substr(1);

                if (!file.startsWith("http")) {
                    file = "https://gist.githubusercontent.com/" + file + "/raw";
                }

                return file;
            }

            var options = {
                elementName: "showdown",
                file: "/README.md",
                slide: 1
            };

            if (root.options) {
                for (var key in root.options) options[key] = root.options[key];
            }

            if (root.document.location.search.length > 1) options.file = getFile(root.document.location.search);
            else if (root.document.location.pathname.length > 1) options.file = getFile(root.document.location.pathname);

            if (root.document.location.hash) {
                options.slide = parseInt(root.document.location.hash.substr(1));
            }

            var element = root.document.getElementById(options.elementName);

            fetch(options.file)
            .then(response => response.text())
            .then(function(markdown) {
                var title = factory(root, element, markdown, options.slide);
                if (title) root.document.title = title;
            });
        });
    }
}(this, function(context, element, markdown, slide) {
    slide = slide || 1;

    function parseMarkdown() {
        var parsed = [];

        var markers = {
            "h": /^#{1,6}/,
            "ul": /^\s{0,2}\*/,
            "ol": /^\s{0,2}\d{1,3}\./,
            "blockquote": /^>/,
            "code": /^```/
        };
        var html = "";
        var inQoute = false;
        var inCode = false;
        var listMarkers = [];

        function formatLine(value) {
            // Images
            value = value.replace(/!\[(.+?)\]\((.+?)\)/g, function(match, title, src) {
                return "<img title='" + title + "' src='" + src + "'/>";
            });

            // Links
            value = value.replace(/\[(.+?)\]\((.+?)\)/g, function(match, link, url) {
                return "<a target='_blank' href='" + url + "'>" + link + "</a>";
            });

            // Bold
            value = value.replace(/__(.+?)__|\*\*(.+?)\*\*/g, function(match, text1, text2) {
                return "<strong>" + (text1 || text2) + "</strong>";
            });

            // Italic<commit_msg>Support `-` for ul items<commit_after>"use strict";

// https://github.com/umdjs/umd
(function (root, factory) {
    if (typeof define === 'function' && define.amd) {
        // AMD. Register as an anonymous module.
        define(factory);
    } else if (typeof exports === 'object') {
        // Node. Does not work with strict CommonJS
        module.exports = factory;
    } else {
        // Browser globals with support for web workers (root is window)

        root.document.addEventListener("DOMContentLoaded", function() {

            function getFile(query) {
                var file = query.substr(1);

                if (!file.startsWith("http")) {
                    file = "https://gist.githubusercontent.com/" + file + "/raw";
                }

                return file;
            }

            var options = {
                elementName: "showdown",
                file: "/README.md",
                slide: 1
            };

            if (root.options) {
                for (var key in root.options) options[key] = root.options[key];
            }

            if (root.document.location.search.length > 1) options.file = getFile(root.document.location.search);
            else if (root.document.location.pathname.length > 1) options.file = getFile(root.document.location.pathname);

            if (root.document.location.hash) {
                options.slide = parseInt(root.document.location.hash.substr(1));
            }

            var element = root.document.getElementById(options.elementName);

            fetch(options.file)
            .then(response => response.text())
            .then(function(markdown) {
                var title = factory(root, element, markdown, options.slide);
                if (title) root.document.title = title;
            });
        });
    }
}(this, function(context, element, markdown, slide) {
    slide = slide || 1;

    function parseMarkdown() {
        var parsed = [];

        var markers = {
            "h": /^#{1,6}/,
            "ul": /^\s{0,2}[\*-]/,
            "ol": /^\s{0,2}\d{1,3}\./,
            "blockquote": /^>/,
            "code": /^```/
        };
        var html = "";
        var inQoute = false;
        var inCode = false;
        var listMarkers = [];

        function formatLine(value) {
            // Images
            value = value.replace(/!\[(.+?)\]\((.+?)\)/g, function(match, title, src) {
                return "<img title='" + title + "' src='" + src + "'/>";
            });

            // Links
            value = value.replace(/\[(.+?)\]\((.+?)\)/g, function(match, link, url) {
                return "<a target='_blank' href='" + url + "'>" + link + "</a>";
            });

            // Bold
            value = value.replace(/__(.+?)__|\*\*(.+?)\*\*/g, function(match, text1, text2) {
                return "<strong>" + (text1 || text2) + "</strong>";
            });

            // Italic
{'fraction_non_alphanumeric': 0.16700889801505817, 'fraction_numerical': 0.006160164271047228, 'mean_word_length': 1.5292081350064908, 'pattern_counts': {'":': 10, '<': 13, '<?xml version=': 0, '>': 21, 'https://': 4, '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': '6770526', 'n_tokens_mistral': 1689, 'n_tokens_neox': 1604, 'n_words': 358}