SO: /js/wmd.js?v=2f79c03846d5

by Pratik Bhonsle

HTML

http://meta.stackoverflow.com/content/js/wmd.js?v=2f79c03846d5

JavaScript

'use strict';
var Markdown = {};
(function () {
    function m(f) {
        return f
    }
    function x() {
        return !1
    }
    function p() {}
    function u() {}
    p.prototype = {
        chain: function (f, o) {
            var t = this[f];
            if (!t) throw Error("unknown hook " + f);
            this[f] = t === m ? o : function (f) {
                var n = Array.prototype.slice.call(arguments, 0);
                n[0] = t.apply(null, n);
                return o.apply(null, n)
            }
        },
        set: function (f, o) {
            if (!this[f]) throw Error("unknown hook " + f);
            this[f] = o
        },
        addNoop: function (f) {
            this[f] = m
        },
        addFalse: function (f) {
            this[f] = x
        }
    };
    Markdown.HookCollection = p;
    u.prototype = {
        set: function (f, o) {
            this["s_" + f] = o
        },
        get: function (f) {
            return this["s_" + f]
        }
    };
    Markdown.Converter = function () {
        function f(a) {
            return a = a.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm, function (a, e, L, b, d, l) {
                e = e.toLowerCase();
                F.set(e, c(L));
                if (d) return b;
                l && G.set(e, l.replace(/"/g, "&quot;"));
                return ""
            })
        }
        function o(a) {
            a = a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm, m);
            a = a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm,
            m);
            a = a.replace(/\n[ ]{0,3}((<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, m);
            a = a.replace(/\n\n[ ]{0,3}(<!(--(?:|(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>[ \t]*(?=\n{2,}))/g,...