Mise en couleur commentaire vb ,dans colorisation syntaxique

3 participants

Voir le sujet précédent Voir le sujet suivant Aller en bas

Résolu Mise en couleur commentaire vb ,dans colorisation syntaxique

Message par Fhoest Mar 13 Aoû 2013 - 11:40

Bonjour,
j'ai suivi le tuto suivant qui est une merveille merci beaucoup à l'auteur, cependant j'ai un petit souci,
[url= https://forum.forumactif.com/t287569-coloriser-les-balises-de-code#2538388]https://forum.forumactif.com/t287569-coloriser-les-balises-de-code#2538388[/url]
Comment puis je insérer le regex suivant:
Code:
["com", /^[^']*'([^']*)$/]
Pour que les commentaires de mon forum soient interprétés comme commentaires VB.
le code proposé met en couleur le texte entre deux apostrophes car il est interprété comme code SQL
cela doit rester car c'est bon,mais j'ai tout de même besoins d'avoir le commentaire colorisé par une seul apostrophe tel un commentaire VB. idem que le REM (commentaire vb)

D'avance merci
A bientôt.Very Happy


Dernière édition par Fhoest le Jeu 15 Aoû 2013 - 13:38, édité 1 fois
avatar

Fhoest
Nouveau membre

Messages : 12
Inscrit(e) le : 13/08/2013

http://programmer-en-vb.forumactif.org/
Fhoest a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Mise en couleur commentaire vb ,dans colorisation syntaxique

Message par Ea Mar 13 Aoû 2013 - 11:48

Bonjour,


Il doit y avoir moyen d'ajouter l'extension visual basic ( lien ) mais après il faut soit :

- choisir que tout les codes soient coloriser suivant la syntaxe visual basic
- choisir une manière permettant de spécifier si le code est visual basic, ou un code de base
- faire des tests sur le contenu du code et d'après le test le coloriser de la syntaxe visual basic ou pas
Ea

Ea
Aidactif
Aidactif

Messages : 23583
Inscrit(e) le : 04/04/2008

Ea a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Mise en couleur commentaire vb ,dans colorisation syntaxique

Message par Fhoest Mar 13 Aoû 2013 - 12:21

Bonjour,
Merci pour cette réponse et lien intéressant.
J'ai besoins d'un petit coup de pouce car je ne suis pas encore bien à l'aise avec l'insertion de ce genre de script,
comment dois je m'y prendre,
Merci.
avatar

Fhoest
Nouveau membre

Messages : 12
Inscrit(e) le : 13/08/2013

http://programmer-en-vb.forumactif.org/
Fhoest a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Mise en couleur commentaire vb ,dans colorisation syntaxique

Message par Ea Mar 13 Aoû 2013 - 12:50

pour la première façon, j'imagine qu'on pourrait modifier le code en :

Code:
$(function () {
    window.PR_SHOULD_USE_CONTINUATION = !0;
    window.PR_TAB_WIDTH = 8;
    window.PR_normalizedHtml = window.PR = window.prettyPrintOne = window.prettyPrint = void 0;
    window._pr_isIE6 = function () {
        var w = navigator && navigator.userAgent && navigator.userAgent.match(/\bMSIE ([678])\./),
            w = w ? +w[1] : !1;
        window._pr_isIE6 = function () {
            return w
        };
        return w
    };
    (function () {
        function w(a) {
            return a.replace(H, "&").replace(I, "<").replace(J, ">")
        }

        function D(a, b, d) {
            switch (a.nodeType) {
            case 1:
                var l = a.tagName.toLowerCase();
                b.push("<",
                    l);
                var e = a.attributes,
                    h = e.length;
                if (h) {
                    if (d) {
                        for (var u = [], j = h; --j >= 0;) u[j] = e[j];
                        u.sort(function (a, b) {
                            return a.name < b.name ? -1 : a.name === b.name ? 0 : 1
                        });
                        e = u
                    }
                    for (j = 0; j < h; ++j) u = e[j], u.specified && b.push(" ", u.name.toLowerCase(), '="', u.value.replace(H, "&amp;").replace(I, "&lt;").replace(J, "&gt;").replace(S, "&quot;"), '"')
                }
                b.push(">");
                for (e = a.firstChild; e; e = e.nextSibling) D(e, b, d);
                (a.firstChild || !/^(?:br|link|img)$/.test(l)) && b.push("</", l, ">");
                break;
            case 3:
            case 4:
                b.push(w(a.nodeValue))
            }
        }

        function K(a) {
            function b(a) {
                if (a.charAt(0) !==
                    "\\") return a.charCodeAt(0);
                switch (a.charAt(1)) {
                case "b":
                    return 8;
                case "t":
                    return 9;
                case "n":
                    return 10;
                case "v":
                    return 11;
                case "f":
                    return 12;
                case "r":
                    return 13;
                case "u":
                case "x":
                    return parseInt(a.substring(2), 16) || a.charCodeAt(1);
                case "0":
                case "1":
                case "2":
                case "3":
                case "4":
                case "5":
                case "6":
                case "7":
                    return parseInt(a.substring(1), 8);
                default:
                    return a.charCodeAt(1)
                }
            }

            function d(a) {
                if (a < 32) return (a < 16 ? "\\x0" : "\\x") + a.toString(16);
                a = String.fromCharCode(a);
                if (a === "\\" || a === "-" || a === "[" || a === "]") a = "\\" +
                    a;
                return a
            }

            function l(a) {
                for (var k = a.substring(1, a.length - 1).match(RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]", "g")), a = [], c = [], j = k[0] === "^", f = j ? 1 : 0, i = k.length; f < i; ++f) {
                    var g = k[f];
                    switch (g) {
                    case "\\B":
                    case "\\b":
                    case "\\D":
                    case "\\d":
                    case "\\S":
                    case "\\s":
                    case "\\W":
                    case "\\w":
                        a.push(g);
                        continue
                    }
                    var g = b(g),
                        e;
                    f + 2 < i && "-" === k[f + 1] ? (e = b(k[f + 2]), f += 2) : e = g;
                    c.push([g, e]);
                    e < 65 || g > 122 || (e < 65 || g > 90 || c.push([Math.max(65, g) | 32, Math.min(e, 90) | 32]),
                        e < 97 || g > 122 || c.push([Math.max(97, g) & -33, Math.min(e, 122) & -33]))
                }
                c.sort(function (a, c) {
                    return a[0] - c[0] || c[1] - a[1]
                });
                k = [];
                g = [NaN, NaN];
                for (f = 0; f < c.length; ++f) i = c[f], i[0] <= g[1] + 1 ? g[1] = Math.max(g[1], i[1]) : k.push(g = i);
                c = ["["];
                j && c.push("^");
                c.push.apply(c, a);
                for (f = 0; f < k.length; ++f) i = k[f], c.push(d(i[0])), i[1] > i[0] && (i[1] + 1 > i[0] && c.push("-"), c.push(d(i[1])));
                c.push("]");
                return c.join("")
            }

            function e(a) {
                for (var b = a.source.match(RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)",
                    "g")), c = b.length, e = [], f = 0, i = 0; f < c; ++f) {
                    var g = b[f];
                    if (g === "(")++i;
                    else if ("\\" === g.charAt(0) && (g = +g.substring(1)) && g <= i) e[g] = -1
                }
                for (f = 1; f < e.length; ++f) - 1 === e[f] && (e[f] = ++h);
                for (i = f = 0; f < c; ++f)
                    if (g = b[f], g === "(")++i, e[i] === void 0 && (b[f] = "(?:");
                else if ("\\" === g.charAt(0) && (g = +g.substring(1)) && g <= i) b[f] = "\\" + e[i];
                for (i = f = 0; f < c; ++f) "^" === b[f] && "^" !== b[f + 1] && (b[f] = "");
                if (a.ignoreCase && u)
                    for (f = 0; f < c; ++f) g = b[f], a = g.charAt(0), g.length >= 2 && a === "[" ? b[f] = l(g) : a !== "\\" && (b[f] = g.replace(/[a-zA-Z]/g, function (a) {
                        a =
                            a.charCodeAt(0);
                        return "[" + String.fromCharCode(a & -33, a | 32) + "]"
                    }));
                return b.join("")
            }
            for (var h = 0, u = !1, j = !1, p = 0, m = a.length; p < m; ++p) {
                var s = a[p];
                if (s.ignoreCase) j = !0;
                else if (/[a-z]/i.test(s.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ""))) {
                    u = !0;
                    j = !1;
                    break
                }
            }
            for (var q = [], p = 0, m = a.length; p < m; ++p) {
                s = a[p];
                if (s.global || s.multiline) throw Error("" + s);
                q.push("(?:" + e(s) + ")")
            }
            return RegExp(q.join("|"), j ? "gi" : "g")
        }

        function T(a) {
            var b = 0;
            return function (d) {
                for (var l = null, e = 0, h = 0, u = d.length; h < u; ++h) switch (d.charAt(h)) {
                case "\t":
                    l ||
                        (l = []);
                    l.push(d.substring(e, h));
                    e = a - b % a;
                    for (b += e; e >= 0; e -= 16) l.push("                ".substring(0, e));
                    e = h + 1;
                    break;
                case "\n":
                    b = 0;
                    break;
                default:
                    ++b
                }
                if (!l) return d;
                l.push(d.substring(e));
                return l.join("")
            }
        }

        function E(a, b, d, l) {
            b && (a = {
                source: b,
                c: a
            }, d(a), l.push.apply(l, a.d))
        }

        function y(a, b) {
            function d(a) {
                for (var j = a.c, p = [j, v], m = 0, s = a.source.match(e) || [], q = {}, t = 0, k = s.length; t < k; ++t) {
                    var c = s[t],
                        n = q[c],
                        f = void 0,
                        i;
                    if (typeof n === "string") i = !1;
                    else {
                        var g = l[c.charAt(0)];
                        if (g) f = c.match(g[1]), n = g[0];
                        else {
                            for (i =
                                0; i < h; ++i)
                                if (g = b[i], f = c.match(g[1])) {
                                    n = g[0];
                                    break
                                }
                            f || (n = v)
                        } if ((i = n.length >= 5 && "lang-" === n.substring(0, 5)) && !(f && typeof f[1] === "string")) i = !1, n = L;
                        i || (q[c] = n)
                    }
                    g = m;
                    m += c.length;
                    if (i) {
                        i = f[1];
                        var o = c.indexOf(i),
                            r = o + i.length;
                        f[2] && (r = c.length - f[2].length, o = r - i.length);
                        n = n.substring(5);
                        E(j + g, c.substring(0, o), d, p);
                        E(j + g + o, i, M(n, i), p);
                        E(j + g + r, c.substring(r), d, p)
                    } else p.push(j + g, n)
                }
                a.d = p
            }
            var l = {}, e;
            (function () {
                for (var d = a.concat(b), j = [], h = {}, m = 0, s = d.length; m < s; ++m) {
                    var q = d[m],
                        t = q[3];
                    if (t)
                        for (var k = t.length; --k >=
                            0;) l[t.charAt(k)] = q;
                    q = q[1];
                    t = "" + q;
                    h.hasOwnProperty(t) || (j.push(q), h[t] = null)
                }
                j.push(/[\0-\uffff]/);
                e = K(j)
            })();
            var h = b.length;
            return d
        }

        function r(a) {
            var b = [],
                d = [];
            a.tripleQuotedStrings ? b.push([x, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\""]) : a.multiLineStrings ? b.push([x, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
                null, "'\"`"
            ]) : b.push([x, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'"]);
            a.verbatimStrings && d.push([x, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
            a.hashComments && (a.cStyleComments ? (b.push([z, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/, null, "#"]), d.push([x, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/, null])) : b.push([z, /^#[^\r\n]*/, null, "#"]));
            a.cStyleComments && (d.push([z, /^\/\/[^\r\n]*/, null]),
                d.push([z, /^\/\*[\s\S]*?(?:\*\/|$)/, null]));
            a.regexLiterals && d.push(["lang-regex", RegExp("^" + U + "(/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/)")]);
            a = a.keywords.replace(/^\s+|\s+$/g, "");
            a.length && d.push([N, RegExp("^(?:" + a.replace(/\s+/g, "|") + ")\\b"), null]);
            b.push([v, /^\s+/, null, " \r\n\t\u00a0"]);
            d.push([F, /^@[a-z_$][a-z_$@0-9]*/i, null], [O, /^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/, null], [v, /^[a-z_$][a-z_$@0-9]*/i, null], [F, /^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,
                null, "0123456789"
            ], [B, /^.[^\s\w\.$@\'\"\`\/\#]*/, null]);
            return y(b, d)
        }

        function V(a) {
            function b(a) {
                if (a > u) {
                    j && j !== p && (h.push("</span>"), j = null);
                    !j && p && (j = p, h.push('<span class="', j, '">'));
                    var b = w(q(d.substring(u, a))).replace(f ? k : t, "$1 ");
                    f = n.test(b);
                    h.push(b.replace(c, o));
                    u = a
                }
            }
            var d = a.source,
                l = a.g,
                e = a.d,
                h = [],
                u = 0,
                j = null,
                p = null,
                m = 0,
                s = 0,
                q = T(window.PR_TAB_WIDTH),
                t = /([\r\n ]) /g,
                k = /(^| ) /gm,
                c = /\r\n?|\n/g,
                n = /[ \r\n]$/,
                f = !0,
                i = window._pr_isIE6(),
                i = i ? a.b.tagName === "PRE" ? i === 6 ? " \r\n" : i === 7 ? " <br>\r" :
                    " \r" : " <br />" : "<br />",
                g = a.b.className.match(/\blinenums\b(?::(\d+))?/),
                o;
            if (g) {
                for (var r = [], A = 0; A < 10; ++A) r[A] = i + '</li><li class="L' + A + '">';
                var v = g[1] && g[1].length ? g[1] - 1 : 0;
                h.push('<ol class="linenums"><li class="L', v % 10, '"');
                v && h.push(' value="', v + 1, '"');
                h.push(">");
                o = function () {
                    var a = r[++v % 10];
                    return j ? "</span>" + a + '<span class="' + j + '">' : a
                }
            } else o = i;
            for (;;)
                if (m < l.length && (s < e.length ? l[m] <= e[s] : 1)) b(l[m]), j && (h.push("</span>"), j = null), h.push(l[m + 1]), m += 2;
                else if (s < e.length) b(e[s]), p = e[s +
                1], s += 2;
            else break;
            b(d.length);
            j && h.push("</span>");
            g && h.push("</li></ol>");
            a.a = h.join("")
        }

        function o(a, b) {
            for (var d = b.length; --d >= 0;) {
                var l = b[d];
                C.hasOwnProperty(l) ? "console" in window && console.warn("cannot override language handler %s", l) : C[l] = a
            }
        }

        function M(a, b) {
            a && C.hasOwnProperty(a) || (a = /^\s*</.test(b) ? "default-markup" : "default-code");
            return C[a]
        }

        function P(a) {
            var b = a.f,
                d = a.e;
            a.a = b;
            try {
                var l, e = b.match(W),
                    b = [],
                    h = 0,
                    o = [];
                if (e)
                    for (var j = 0, p = e.length; j < p; ++j) {
                        var m = e[j];
                        if (m.length > 1 && m.charAt(0) ===
                            "<") {
                            if (!X.test(m))
                                if (Y.test(m)) b.push(m.substring(9, m.length - 3)), h += m.length - 12;
                                else if (Z.test(m)) b.push("\n"), ++h;
                            else if (m.indexOf(Q) >= 0 && m.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g, ' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)) {
                                var s = m.match(R)[2],
                                    q = 1,
                                    t;
                                t = j + 1;
                                a: for (; t < p; ++t) {
                                    var k = e[t].match(R);
                                    if (k && k[2] === s)
                                        if (k[1] === "/") {
                                            if (--q === 0) break a
                                        } else ++q
                                }
                                t < p ? (o.push(h, e.slice(j, t + 1).join("")), j = t) : o.push(h, m)
                            } else o.push(h, m)
                        } else {
                            var c, q = m,
                                n = q.indexOf("&");
                            if (n <
                                0) c = q;
                            else {
                                for (--n;
                                    (n = q.indexOf("&#", n + 1)) >= 0;) {
                                    var f = q.indexOf(";", n);
                                    if (f >= 0) {
                                        var i = q.substring(n + 3, f),
                                            g = 10;
                                        i && i.charAt(0) === "x" && (i = i.substring(1), g = 16);
                                        var r = parseInt(i, g);
                                        isNaN(r) || (q = q.substring(0, n) + String.fromCharCode(r) + q.substring(f + 1))
                                    }
                                }
                                c = q.replace(aa, "<").replace(ba, ">").replace(ca, "'").replace(da, '"').replace(ea, " ").replace(fa, "&")
                            }
                            b.push(c);
                            h += c.length
                        }
                    }
                l = {
                    source: b.join(""),
                    h: o
                };
                var v = l.source;
                a.source = v;
                a.c = 0;
                a.g = l.h;
                M(d, v)(a);
                V(a)
            } catch (w) {
                "console" in window && console.log(w && w.stack ?
                    w.stack : w)
            }
        }
        var x = "str",
            N = "kwd",
            z = "com",
            O = "typ",
            F = "lit",
            B = "pun",
            v = "pln",
            L = "src",
            Q = "nocode",
            U = function () {
                for (var a = ["!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=", "&=", "(", "*", "*=", "+=", ",", "-=", "->", "/", "/=", ":", "::", ";", "<", "<<", "<<=", "<=", "=", "==", "===", ">", ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[", "^", "^=", "^^", "^^=", "{", "|", "|=", "||", "||=", "~", "break", "case", "continue", "delete", "do", "else", "finally", "instanceof", "return", "throw", "try", "typeof"], b = "(?:^^|[+-]", d = 0; d < a.length; ++d) b += "|" + a[d].replace(/([^=<>:&a-z])/g,
                    "\\$1");
                b += ")\\s*";
                return b
            }(),
            H = /&/g,
            I = /</g,
            J = />/g,
            S = /\"/g,
            aa = /&lt;/g,
            ba = /&gt;/g,
            ca = /&apos;/g,
            da = /&quot;/g,
            fa = /&amp;/g,
            ea = / /g,
            ga = /[\r\n]/g,
            G = null,
            W = RegExp("[^<]+|<\!--[\\s\\S]*?--\>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z](?:[^>\"']|'[^']*'|\"[^\"]*\")*>|<", "g"),
            X = /^<\!--/,
            Y = /^<!\[CDATA\[/,
            Z = /^<br\b/i,
            R = /^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/,
            ha = r({
                keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END break continue do else for if return while case done elif esac eval fi function in local set then until ",
                hashComments: !0,
                cStyleComments: !0,
                multiLineStrings: !0,
                regexLiterals: !0
            }),
            C = {};
        o(ha, ["default-code"]);
        o(y([], [
            [v, /^[^<?]+/],
            ["dec", /^<!\w[^>]*(?:>|$)/],
            [z, /^<\!--[\s\S]*?(?:-\->|$)/],
            ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/],
            ["lang-", /^<%([\s\S]+?)(?:%>|$)/],
            [B, /^(?:<[%?]|[%?]>)/],
            ["lang-", /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
            ["lang-js", /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
            ["lang-css", /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
            ["lang-sql", /^<sql>([\s\S]*?)(<\/sql>)/i],
            ["lang-in.tag",
                /^(<\/?[a-z][^<>]*>)/i
            ]
        ]), ["default-markup", "htm", "html", "mxml", "xhtml", "xml", "xsl"]);
        o(y([
            [v, /^[\s]+/, null, " \t\r\n"],
            ["atv", /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, "\"'"]
        ], [
            ["tag", /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
            ["atn", /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
            ["lang-uq.val", /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
            [B, /^[=<>\/]+/],
            ["lang-js", /^on\w+\s*=\s*\"([^\"]+)\"/i],
            ["lang-js", /^on\w+\s*=\s*\'([^\']+)\'/i],
            ["lang-js", /^on\w+\s*=\s*([^\"\'>\s]+)/i],
            ["lang-css", /^style\s*=\s*\"([^\"]+)\"/i],
            ["lang-css", /^style\s*=\s*\'([^\']+)\'/i],
            ["lang-css", /^style\s*=\s*([^\"\'>\s]+)/i]
        ]), ["in.tag"]);
        o(y([], [
            ["atv", /^[\s\S]+/]
        ]), ["uq.val"]);
        o(r({
            keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where ",
            hashComments: !0,
            cStyleComments: !0
        }), ["c", "cc", "cpp", "cxx", "cyc", "m"]);
        o(r({
            keywords: "null true false"
        }), ["json"]);
        o(r({
            keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",
            hashComments: !0,
            cStyleComments: !0,
            verbatimStrings: !0
        }), ["cs"]);
        o(r({
            keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",
            cStyleComments: !0
        }), ["java"]);
        o(r({
            keywords: "break continue do else for if return while case done elif esac eval fi function in local set then until ",
            hashComments: !0,
            multiLineStrings: !0
        }), ["bsh", "csh", "sh"]);
        o(r({
            keywords: "break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ",
            hashComments: !0,
            multiLineStrings: !0,
            tripleQuotedStrings: !0
        }), ["cv", "py"]);
        o(r({
            keywords: "caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ",
            hashComments: !0,
            multiLineStrings: !0,
            regexLiterals: !0
        }), ["perl", "pl", "pm"]);
        o(r({
            keywords: "break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ",
            hashComments: !0,
            multiLineStrings: !0,
            regexLiterals: !0
        }), ["rb"]);
        o(r({
            keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN ",
            cStyleComments: !0,
            regexLiterals: !0
        }), ["js"]);
        o(y([], [
            [x, /^[\s\S]+/]
        ]), ["regex"]);
        window.PR_normalizedHtml = D;
        window.prettyPrintOne = function (a, b) {
            var d = {
                f: a,
                e: b
            };
            P(d);
            return d.a
        };
        window.prettyPrint = function (a) {
            function b() {
                for (var e = window.PR_SHOULD_USE_CONTINUATION ? j.now() + 250 : Infinity; p < l.length && j.now() < e; p++) {
                    var d = l[p];
                    if (d.className && d.className.indexOf("prettyprint") >= 0) {
                        var h = d.className.match(/\blang-(\w+)\b/);
                        h && (h = h[1]);
                        for (var k = !1, c = d.parentNode; c; c = c.parentNode)
                            if ((c.tagName === "pre" ||
                                c.tagName === "code" || c.tagName === "xmp") && c.className && c.className.indexOf("prettyprint") >= 0) {
                                k = !0;
                                break
                            }
                        if (!k) {
                            c = d;
                            null === G && (k = document.createElement("PRE"), k.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />')), G = !/</.test(k.innerHTML));
                            if (G)
                                if (k = c.innerHTML, "XMP" === c.tagName) k = w(k);
                                else {
                                    if ("PRE" === c.tagName) c = !0;
                                    else if (ga.test(k)) {
                                        var n = "";
                                        if (c.currentStyle) n = c.currentStyle.whiteSpace;
                                        else if (window.getComputedStyle) n = window.getComputedStyle(c, null).whiteSpace;
                                        c = !n ||
                                            n === "pre"
                                    } else c = !0;
                                    c || (k = k.replace(/(<br\s*\/?>)[\r\n]+/g, "$1").replace(/(?:[\r\n]+[ \t]*)+/g, " "))
                                } else {
                                    k = [];
                                    for (c = c.firstChild; c; c = c.nextSibling) D(c, k);
                                    k = k.join("")
                                }
                            k = k.replace(/(?:\r\n?|\n)$/, "");
                            m = {
                                f: k,
                                e: h,
                                b: d
                            };
                            P(m);
                            if (d = m.a)
                                if (h = m.b, "XMP" === h.tagName) {
                                    k = document.createElement("PRE");
                                    for (c = 0; c < h.attributes.length; ++c)
                                        if (n = h.attributes[c], n.specified) n.name.toLowerCase() === "class" ? k.className = n.value : k.setAttribute(n.name, n.value);
                                    k.innerHTML = d;
                                    h.parentNode.replaceChild(k, h)
                                } else h.innerHTML =
                                    d
                        }
                    }
                }
                p < l.length ? setTimeout(b, 250) : a && a()
            }
            for (var d = [document.getElementsByTagName("pre"), document.getElementsByTagName("code"), document.getElementsByTagName("xmp")], l = [], e = 0; e < d.length; ++e)
                for (var h = 0, o = d[e].length; h < o; ++h) l.push(d[e][h]);
            var d = null,
                j = Date;
            j.now || (j = {
                now: function () {
                    return (new Date).getTime()
                }
            });
            var p = 0,
                m;
            b()
        };
        window.PR = {
            combinePrefixPatterns: K,
            createSimpleLexer: y,
            registerLangHandler: o,
            sourceDecorator: r,
            PR_ATTRIB_NAME: "atn",
            PR_ATTRIB_VALUE: "atv",
            PR_COMMENT: z,
            PR_DECLARATION: "dec",
            PR_KEYWORD: N,
            PR_LITERAL: F,
            PR_NOCODE: Q,
            PR_PLAIN: v,
            PR_PUNCTUATION: B,
            PR_SOURCE: L,
            PR_STRING: x,
            PR_TAG: "tag",
            PR_TYPE: O
        }
    })();
    PR.registerLangHandler(PR.createSimpleLexer([
        ["pln", /^[ \t\r\n\f]+/, null, " \t\r\n\u000c"]
    ], [
        ["str", /^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/, null],
        ["str", /^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/, null],
        ["lang-css-str", /^url\(([^\)\"\']*)\)/i],
        ["kwd", /^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i, null],
        ["lang-css-kw", /^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],
        ["com", /^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],
        ["com", /^(?:<\!--|--\>)/],
        ["lit", /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],
        ["lit", /^#(?:[0-9a-f]{3}){1,2}/i],
        ["pln", /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],
        ["pun", /^[^\s\w\'\"]+/]
    ]), ["css"]);
    PR.registerLangHandler(PR.createSimpleLexer([], [
        ["kwd", /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]
    ]), ["css-kw"]);
    PR.registerLangHandler(PR.createSimpleLexer([], [
        ["str", /^[^\)\"\']+/]
    ]), ["css-str"]);
    PR.registerLangHandler(PR.createSimpleLexer([
        ["pln",
            /^[\t\n\r \xA0]+/, null, "\t\n\r \u00a0"
        ],
        ["str", /^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/, null, "\"'"]
    ], [
        ["com", /^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],
        ["kwd", /^(?:ADD|ALL|ALTER|AND|ANY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|NATIONAL|NOCHECK|NONCLUSTERED|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PERCENT|PLAN|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNION|UNIQUE|UPDATE|UPDATETEXT|USE|USER|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WRITETEXT)(?=[^\w-]|$)/i,
            null
        ],
        ["lit", /^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],
        ["pln", /^[a-z_][\w-]*/i],
        ["pun", /^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0+\-\"\']*/]
    ]), ["sql"]);
    window.PR['registerLangHandler'](
        window.PR['createSimpleLexer'](
            [
                // Whitespace
                [window.PR['PR_PLAIN'], /^[\t\n\r \xA0\u2028\u2029]+/, null, '\t\n\r \xA0\u2028\u2029'],
                // A double quoted string with quotes escaped by doubling them.
                // A single character can be suffixed with C.
                [window.PR['PR_STRING'], /^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i, null,
                    '"\u201C\u201D'
                ],
                // A comment starts with a single quote and runs until the end of the
                // line.
                // VB6 apparently allows _ as an escape sequence for newlines though
                // this is not a documented feature of VB.net.
                // http://meta.stackoverflow.com/q/121497/137403
                [window.PR['PR_COMMENT'], /^[\'\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\r\n_\u2028\u2029])*/, null, '\'\u2018\u2019']
            ], [
                [window.PR['PR_KEYWORD'], /^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i, null],
                // A second comment form
                [window.PR['PR_COMMENT'], /^REM\b[^\r\n\u2028\u2029]*/i],
                // A boolean, numeric, or date literal.
                [window.PR['PR_LITERAL'],
                    /^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i
                ],
                // An identifier.  Keywords can be turned into identifers
                // with square brackets, and there may be optional type
                // characters after a normal identifier in square brackets.
                [window.PR['PR_PLAIN'], /^(?:(?:[a-z]|_\w)\w*(?:\[[%&@!#]+\])?|\[(?:[a-z]|_\w)\w*\])/i],
                // A run of punctuation
                [window.PR['PR_PUNCTUATION'],
                    /^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/
                ],
                // Square brackets
                [window.PR['PR_PUNCTUATION'], /^(?:\[|\])/]
            ]), ['vb', 'vbs']);
    $("code,td.code div.cont_code").wrapInner('<pre class="prettyprint lang-vb" />');
    prettyPrint();
});
Ea

Ea
Aidactif
Aidactif

Messages : 23583
Inscrit(e) le : 04/04/2008

Ea a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Mise en couleur commentaire vb ,dans colorisation syntaxique

Message par Fhoest Mer 14 Aoû 2013 - 12:23

Bonjour,
merci ,
cela est presque parfait à l’exception de ceci
devant chaque ligne le code me met le code d'un espace $ n b s p tout attaché
A part ça c'est nickel,
j'ai essayer une replace ("$ n b s p; "," "), sans succès

A bientôt.
avatar

Fhoest
Nouveau membre

Messages : 12
Inscrit(e) le : 13/08/2013

http://programmer-en-vb.forumactif.org/
Fhoest a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Mise en couleur commentaire vb ,dans colorisation syntaxique

Message par Ea Mer 14 Aoû 2013 - 13:22

devant chaque ligne il est écrit &nbsp; ou bien il y a un espace ?

si j'exécute le code manuellement je ne vois aucun des deux problèmes :
https://i.imgur.com/GVPOBQk.png
Ea

Ea
Aidactif
Aidactif

Messages : 23583
Inscrit(e) le : 04/04/2008

Ea a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Mise en couleur commentaire vb ,dans colorisation syntaxique

Message par Fhoest Mer 14 Aoû 2013 - 23:06

Bonsoir,
cela est normale que vous ne voyait pas le problème car j'ai retirer le script que vous m'avez fourni dans l'attente de la réponse à mon problème d'espace.
dans l'image que vous avez mis remarquez que le commentaire fini bien par une apostrophe c'est pour cela qu'il est colorisé correctement .
voici une image avec le code:
Mise en couleur commentaire vb ,dans colorisation syntaxique Exempl10

A bientôt.Very Happy 
pour les commentaires ils sont ok avec votre code.
encore merci.
avatar

Fhoest
Nouveau membre

Messages : 12
Inscrit(e) le : 13/08/2013

http://programmer-en-vb.forumactif.org/
Fhoest a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Mise en couleur commentaire vb ,dans colorisation syntaxique

Message par Ea Jeu 15 Aoû 2013 - 0:36

okay, j'ai pu reproduire


j'ai du mal intégré le plugin, j'ai essayé en faisant plutôt ce code :

Code:
$(function () {
    window.PR_SHOULD_USE_CONTINUATION = !0;
    window.PR_TAB_WIDTH = 8;
    window.PR_normalizedHtml = window.PR = window.prettyPrintOne = window.prettyPrint = void 0;
    window._pr_isIE6 = function () {
        var w = navigator && navigator.userAgent && navigator.userAgent.match(/\bMSIE ([678])\./),
            w = w ? +w[1] : !1;
        window._pr_isIE6 = function () {
            return w
        };
        return w
    };
    (function () {
        function w(a) {
            return a.replace(H, "&amp;").replace(I, "&lt;").replace(J, "&gt;")
        }

        function D(a, b, d) {
            switch (a.nodeType) {
            case 1:
                var l = a.tagName.toLowerCase();
                b.push("<",
                    l);
                var e = a.attributes,
                    h = e.length;
                if (h) {
                    if (d) {
                        for (var u = [], j = h; --j >= 0;) u[j] = e[j];
                        u.sort(function (a, b) {
                            return a.name < b.name ? -1 : a.name === b.name ? 0 : 1
                        });
                        e = u
                    }
                    for (j = 0; j < h; ++j) u = e[j], u.specified && b.push(" ", u.name.toLowerCase(), '="', u.value.replace(H, "&amp;").replace(I, "&lt;").replace(J, "&gt;").replace(S, "&quot;"), '"')
                }
                b.push(">");
                for (e = a.firstChild; e; e = e.nextSibling) D(e, b, d);
                (a.firstChild || !/^(?:br|link|img)$/.test(l)) && b.push("</", l, ">");
                break;
            case 3:
            case 4:
                b.push(w(a.nodeValue))
            }
        }

        function K(a) {
            function b(a) {
                if (a.charAt(0) !==
                    "\\") return a.charCodeAt(0);
                switch (a.charAt(1)) {
                case "b":
                    return 8;
                case "t":
                    return 9;
                case "n":
                    return 10;
                case "v":
                    return 11;
                case "f":
                    return 12;
                case "r":
                    return 13;
                case "u":
                case "x":
                    return parseInt(a.substring(2), 16) || a.charCodeAt(1);
                case "0":
                case "1":
                case "2":
                case "3":
                case "4":
                case "5":
                case "6":
                case "7":
                    return parseInt(a.substring(1), 8);
                default:
                    return a.charCodeAt(1)
                }
            }

            function d(a) {
                if (a < 32) return (a < 16 ? "\\x0" : "\\x") + a.toString(16);
                a = String.fromCharCode(a);
                if (a === "\\" || a === "-" || a === "[" || a === "]") a = "\\" +
                    a;
                return a
            }

            function l(a) {
                for (var k = a.substring(1, a.length - 1).match(RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]", "g")), a = [], c = [], j = k[0] === "^", f = j ? 1 : 0, i = k.length; f < i; ++f) {
                    var g = k[f];
                    switch (g) {
                    case "\\B":
                    case "\\b":
                    case "\\D":
                    case "\\d":
                    case "\\S":
                    case "\\s":
                    case "\\W":
                    case "\\w":
                        a.push(g);
                        continue
                    }
                    var g = b(g),
                        e;
                    f + 2 < i && "-" === k[f + 1] ? (e = b(k[f + 2]), f += 2) : e = g;
                    c.push([g, e]);
                    e < 65 || g > 122 || (e < 65 || g > 90 || c.push([Math.max(65, g) | 32, Math.min(e, 90) | 32]),
                        e < 97 || g > 122 || c.push([Math.max(97, g) & -33, Math.min(e, 122) & -33]))
                }
                c.sort(function (a, c) {
                    return a[0] - c[0] || c[1] - a[1]
                });
                k = [];
                g = [NaN, NaN];
                for (f = 0; f < c.length; ++f) i = c[f], i[0] <= g[1] + 1 ? g[1] = Math.max(g[1], i[1]) : k.push(g = i);
                c = ["["];
                j && c.push("^");
                c.push.apply(c, a);
                for (f = 0; f < k.length; ++f) i = k[f], c.push(d(i[0])), i[1] > i[0] && (i[1] + 1 > i[0] && c.push("-"), c.push(d(i[1])));
                c.push("]");
                return c.join("")
            }

            function e(a) {
                for (var b = a.source.match(RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)",
                    "g")), c = b.length, e = [], f = 0, i = 0; f < c; ++f) {
                    var g = b[f];
                    if (g === "(")++i;
                    else if ("\\" === g.charAt(0) && (g = +g.substring(1)) && g <= i) e[g] = -1
                }
                for (f = 1; f < e.length; ++f) - 1 === e[f] && (e[f] = ++h);
                for (i = f = 0; f < c; ++f)
                    if (g = b[f], g === "(")++i, e[i] === void 0 && (b[f] = "(?:");
                else if ("\\" === g.charAt(0) && (g = +g.substring(1)) && g <= i) b[f] = "\\" + e[i];
                for (i = f = 0; f < c; ++f) "^" === b[f] && "^" !== b[f + 1] && (b[f] = "");
                if (a.ignoreCase && u)
                    for (f = 0; f < c; ++f) g = b[f], a = g.charAt(0), g.length >= 2 && a === "[" ? b[f] = l(g) : a !== "\\" && (b[f] = g.replace(/[a-zA-Z]/g, function (a) {
                        a =
                            a.charCodeAt(0);
                        return "[" + String.fromCharCode(a & -33, a | 32) + "]"
                    }));
                return b.join("")
            }
            for (var h = 0, u = !1, j = !1, p = 0, m = a.length; p < m; ++p) {
                var s = a[p];
                if (s.ignoreCase) j = !0;
                else if (/[a-z]/i.test(s.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ""))) {
                    u = !0;
                    j = !1;
                    break
                }
            }
            for (var q = [], p = 0, m = a.length; p < m; ++p) {
                s = a[p];
                if (s.global || s.multiline) throw Error("" + s);
                q.push("(?:" + e(s) + ")")
            }
            return RegExp(q.join("|"), j ? "gi" : "g")
        }

        function T(a) {
            var b = 0;
            return function (d) {
                for (var l = null, e = 0, h = 0, u = d.length; h < u; ++h) switch (d.charAt(h)) {
                case "\t":
                    l ||
                        (l = []);
                    l.push(d.substring(e, h));
                    e = a - b % a;
                    for (b += e; e >= 0; e -= 16) l.push("                ".substring(0, e));
                    e = h + 1;
                    break;
                case "\n":
                    b = 0;
                    break;
                default:
                    ++b
                }
                if (!l) return d;
                l.push(d.substring(e));
                return l.join("")
            }
        }

        function E(a, b, d, l) {
            b && (a = {
                source: b,
                c: a
            }, d(a), l.push.apply(l, a.d))
        }

        function y(a, b) {
            function d(a) {
                for (var j = a.c, p = [j, v], m = 0, s = a.source.match(e) || [], q = {}, t = 0, k = s.length; t < k; ++t) {
                    var c = s[t],
                        n = q[c],
                        f = void 0,
                        i;
                    if (typeof n === "string") i = !1;
                    else {
                        var g = l[c.charAt(0)];
                        if (g) f = c.match(g[1]), n = g[0];
                        else {
                            for (i =
                                0; i < h; ++i)
                                if (g = b[i], f = c.match(g[1])) {
                                    n = g[0];
                                    break
                                }
                            f || (n = v)
                        } if ((i = n.length >= 5 && "lang-" === n.substring(0, 5)) && !(f && typeof f[1] === "string")) i = !1, n = L;
                        i || (q[c] = n)
                    }
                    g = m;
                    m += c.length;
                    if (i) {
                        i = f[1];
                        var o = c.indexOf(i),
                            r = o + i.length;
                        f[2] && (r = c.length - f[2].length, o = r - i.length);
                        n = n.substring(5);
                        E(j + g, c.substring(0, o), d, p);
                        E(j + g + o, i, M(n, i), p);
                        E(j + g + r, c.substring(r), d, p)
                    } else p.push(j + g, n)
                }
                a.d = p
            }
            var l = {}, e;
            (function () {
                for (var d = a.concat(b), j = [], h = {}, m = 0, s = d.length; m < s; ++m) {
                    var q = d[m],
                        t = q[3];
                    if (t)
                        for (var k = t.length; --k >=
                            0;) l[t.charAt(k)] = q;
                    q = q[1];
                    t = "" + q;
                    h.hasOwnProperty(t) || (j.push(q), h[t] = null)
                }
                j.push(/[\0-\uffff]/);
                e = K(j)
            })();
            var h = b.length;
            return d
        }

        function r(a) {
            var b = [],
                d = [];
            a.tripleQuotedStrings ? b.push([x, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\""]) : a.multiLineStrings ? b.push([x, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
                null, "'\"`"
            ]) : b.push([x, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'"]);
            a.verbatimStrings && d.push([x, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
            a.hashComments && (a.cStyleComments ? (b.push([z, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/, null, "#"]), d.push([x, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/, null])) : b.push([z, /^#[^\r\n]*/, null, "#"]));
            a.cStyleComments && (d.push([z, /^\/\/[^\r\n]*/, null]),
                d.push([z, /^\/\*[\s\S]*?(?:\*\/|$)/, null]));
            a.regexLiterals && d.push(["lang-regex", RegExp("^" + U + "(/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/)")]);
            a = a.keywords.replace(/^\s+|\s+$/g, "");
            a.length && d.push([N, RegExp("^(?:" + a.replace(/\s+/g, "|") + ")\\b"), null]);
            b.push([v, /^\s+/, null, " \r\n\t\u00a0"]);
            d.push([F, /^@[a-z_$][a-z_$@0-9]*/i, null], [O, /^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/, null], [v, /^[a-z_$][a-z_$@0-9]*/i, null], [F, /^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,
                null, "0123456789"
            ], [B, /^.[^\s\w\.$@\'\"\`\/\#]*/, null]);
            return y(b, d)
        }

        function V(a) {
            function b(a) {
                if (a > u) {
                    j && j !== p && (h.push("</span>"), j = null);
                    !j && p && (j = p, h.push('<span class="', j, '">'));
                    var b = w(q(d.substring(u, a))).replace(f ? k : t, "$1 ");
                    f = n.test(b);
                    h.push(b.replace(c, o));
                    u = a
                }
            }
            var d = a.source,
                l = a.g,
                e = a.d,
                h = [],
                u = 0,
                j = null,
                p = null,
                m = 0,
                s = 0,
                q = T(window.PR_TAB_WIDTH),
                t = /([\r\n ]) /g,
                k = /(^| ) /gm,
                c = /\r\n?|\n/g,
                n = /[ \r\n]$/,
                f = !0,
                i = window._pr_isIE6(),
                i = i ? a.b.tagName === "PRE" ? i === 6 ? " \r\n" : i === 7 ? " <br>\r" :
                    " \r" : " <br />" : "<br />",
                g = a.b.className.match(/\blinenums\b(?::(\d+))?/),
                o;
            if (g) {
                for (var r = [], A = 0; A < 10; ++A) r[A] = i + '</li><li class="L' + A + '">';
                var v = g[1] && g[1].length ? g[1] - 1 : 0;
                h.push('<ol class="linenums"><li class="L', v % 10, '"');
                v && h.push(' value="', v + 1, '"');
                h.push(">");
                o = function () {
                    var a = r[++v % 10];
                    return j ? "</span>" + a + '<span class="' + j + '">' : a
                }
            } else o = i;
            for (;;)
                if (m < l.length && (s < e.length ? l[m] <= e[s] : 1)) b(l[m]), j && (h.push("</span>"), j = null), h.push(l[m + 1]), m += 2;
                else if (s < e.length) b(e[s]), p = e[s +
                1], s += 2;
            else break;
            b(d.length);
            j && h.push("</span>");
            g && h.push("</li></ol>");
            a.a = h.join("")
        }

        function o(a, b) {
            for (var d = b.length; --d >= 0;) {
                var l = b[d];
                C.hasOwnProperty(l) ? "console" in window && console.warn("cannot override language handler %s", l) : C[l] = a
            }
        }

        function M(a, b) {
            a && C.hasOwnProperty(a) || (a = /^\s*</.test(b) ? "default-markup" : "default-code");
            return C[a]
        }

        function P(a) {
            var b = a.f,
                d = a.e;
            a.a = b;
            try {
                var l, e = b.match(W),
                    b = [],
                    h = 0,
                    o = [];
                if (e)
                    for (var j = 0, p = e.length; j < p; ++j) {
                        var m = e[j];
                        if (m.length > 1 && m.charAt(0) ===
                            "<") {
                            if (!X.test(m))
                                if (Y.test(m)) b.push(m.substring(9, m.length - 3)), h += m.length - 12;
                                else if (Z.test(m)) b.push("\n"), ++h;
                            else if (m.indexOf(Q) >= 0 && m.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g, ' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)) {
                                var s = m.match(R)[2],
                                    q = 1,
                                    t;
                                t = j + 1;
                                a: for (; t < p; ++t) {
                                    var k = e[t].match(R);
                                    if (k && k[2] === s)
                                        if (k[1] === "/") {
                                            if (--q === 0) break a
                                        } else ++q
                                }
                                t < p ? (o.push(h, e.slice(j, t + 1).join("")), j = t) : o.push(h, m)
                            } else o.push(h, m)
                        } else {
                            var c, q = m,
                                n = q.indexOf("&");
                            if (n <
                                0) c = q;
                            else {
                                for (--n;
                                    (n = q.indexOf("&#", n + 1)) >= 0;) {
                                    var f = q.indexOf(";", n);
                                    if (f >= 0) {
                                        var i = q.substring(n + 3, f),
                                            g = 10;
                                        i && i.charAt(0) === "x" && (i = i.substring(1), g = 16);
                                        var r = parseInt(i, g);
                                        isNaN(r) || (q = q.substring(0, n) + String.fromCharCode(r) + q.substring(f + 1))
                                    }
                                }
                                c = q.replace(aa, "<").replace(ba, ">").replace(ca, "'").replace(da, '"').replace(ea, " ").replace(fa, "&")
                            }
                            b.push(c);
                            h += c.length
                        }
                    }
                l = {
                    source: b.join(""),
                    h: o
                };
                var v = l.source;
                a.source = v;
                a.c = 0;
                a.g = l.h;
                M(d, v)(a);
                V(a)
            } catch (w) {
                "console" in window && console.log(w && w.stack ?
                    w.stack : w)
            }
        }
        var x = "str",
            N = "kwd",
            z = "com",
            O = "typ",
            F = "lit",
            B = "pun",
            v = "pln",
            L = "src",
            Q = "nocode",
            U = function () {
                for (var a = ["!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=", "&=", "(", "*", "*=", "+=", ",", "-=", "->", "/", "/=", ":", "::", ";", "<", "<<", "<<=", "<=", "=", "==", "===", ">", ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[", "^", "^=", "^^", "^^=", "{", "|", "|=", "||", "||=", "~", "break", "case", "continue", "delete", "do", "else", "finally", "instanceof", "return", "throw", "try", "typeof"], b = "(?:^^|[+-]", d = 0; d < a.length; ++d) b += "|" + a[d].replace(/([^=<>:&a-z])/g,
                    "\\$1");
                b += ")\\s*";
                return b
            }(),
            H = /&/g,
            I = /</g,
            J = />/g,
            S = /\"/g,
            aa = /&lt;/g,
            ba = /&gt;/g,
            ca = /&apos;/g,
            da = /&quot;/g,
            fa = /&amp;/g,
            ea = / /g,
            ga = /[\r\n]/g,
            G = null,
            W = RegExp("[^<]+|<\!--[\\s\\S]*?--\>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z](?:[^>\"']|'[^']*'|\"[^\"]*\")*>|<", "g"),
            X = /^<\!--/,
            Y = /^<!\[CDATA\[/,
            Z = /^<br\b/i,
            R = /^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/,
            ha = r({
                keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END break continue do else for if return while case done elif esac eval fi function in local set then until ",
                hashComments: !0,
                cStyleComments: !0,
                multiLineStrings: !0,
                regexLiterals: !0
            }),
            C = {};
        o(ha, ["default-code"]);
        o(y([], [
            [v, /^[^<?]+/],
            ["dec", /^<!\w[^>]*(?:>|$)/],
            [z, /^<\!--[\s\S]*?(?:-\->|$)/],
            ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/],
            ["lang-", /^<%([\s\S]+?)(?:%>|$)/],
            [B, /^(?:<[%?]|[%?]>)/],
            ["lang-", /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
            ["lang-js", /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
            ["lang-css", /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
            ["lang-sql", /^<sql>([\s\S]*?)(<\/sql>)/i],
            ["lang-in.tag",
                /^(<\/?[a-z][^<>]*>)/i
            ]
        ]), ["default-markup", "htm", "html", "mxml", "xhtml", "xml", "xsl"]);
        o(y([
            [v, /^[\s]+/, null, " \t\r\n"],
            ["atv", /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, "\"'"]
        ], [
            ["tag", /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
            ["atn", /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
            ["lang-uq.val", /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
            [B, /^[=<>\/]+/],
            ["lang-js", /^on\w+\s*=\s*\"([^\"]+)\"/i],
            ["lang-js", /^on\w+\s*=\s*\'([^\']+)\'/i],
            ["lang-js", /^on\w+\s*=\s*([^\"\'>\s]+)/i],
            ["lang-css", /^style\s*=\s*\"([^\"]+)\"/i],
            ["lang-css", /^style\s*=\s*\'([^\']+)\'/i],
            ["lang-css", /^style\s*=\s*([^\"\'>\s]+)/i]
        ]), ["in.tag"]);
        o(y([], [
            ["atv", /^[\s\S]+/]
        ]), ["uq.val"]);
        o(r({
            keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where ",
            hashComments: !0,
            cStyleComments: !0
        }), ["c", "cc", "cpp", "cxx", "cyc", "m"]);
        o(r({
            keywords: "null true false"
        }), ["json"]);
        o(r({
            keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",
            hashComments: !0,
            cStyleComments: !0,
            verbatimStrings: !0
        }), ["cs"]);
        o(r({
            keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",
            cStyleComments: !0
        }), ["java"]);
        o(r({
            keywords: "break continue do else for if return while case done elif esac eval fi function in local set then until ",
            hashComments: !0,
            multiLineStrings: !0
        }), ["bsh", "csh", "sh"]);
        o(r({
            keywords: "break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ",
            hashComments: !0,
            multiLineStrings: !0,
            tripleQuotedStrings: !0
        }), ["cv", "py"]);
        o(r({
            keywords: "caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ",
            hashComments: !0,
            multiLineStrings: !0,
            regexLiterals: !0
        }), ["perl", "pl", "pm"]);
        o(r({
            keywords: "break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ",
            hashComments: !0,
            multiLineStrings: !0,
            regexLiterals: !0
        }), ["rb"]);
        o(r({
            keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN ",
            cStyleComments: !0,
            regexLiterals: !0
        }), ["js"]);
        o(y([], [
            [x, /^[\s\S]+/]
        ]), ["regex"]);
        window.PR_normalizedHtml = D;
        window.prettyPrintOne = function (a, b) {
            var d = {
                f: a,
                e: b
            };
            P(d);
            return d.a
        };
        window.prettyPrint = function (a) {
            function b() {
                for (var e = window.PR_SHOULD_USE_CONTINUATION ? j.now() + 250 : Infinity; p < l.length && j.now() < e; p++) {
                    var d = l[p];
                    if (d.className && d.className.indexOf("prettyprint") >= 0) {
                        var h = d.className.match(/\blang-(\w+)\b/);
                        h && (h = h[1]);
                        for (var k = !1, c = d.parentNode; c; c = c.parentNode)
                            if ((c.tagName === "pre" ||
                                c.tagName === "code" || c.tagName === "xmp") && c.className && c.className.indexOf("prettyprint") >= 0) {
                                k = !0;
                                break
                            }
                        if (!k) {
                            c = d;
                            null === G && (k = document.createElement("PRE"), k.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />')), G = !/</.test(k.innerHTML));
                            if (G)
                                if (k = c.innerHTML, "XMP" === c.tagName) k = w(k);
                                else {
                                    if ("PRE" === c.tagName) c = !0;
                                    else if (ga.test(k)) {
                                        var n = "";
                                        if (c.currentStyle) n = c.currentStyle.whiteSpace;
                                        else if (window.getComputedStyle) n = window.getComputedStyle(c, null).whiteSpace;
                                        c = !n ||
                                            n === "pre"
                                    } else c = !0;
                                    c || (k = k.replace(/(<br\s*\/?>)[\r\n]+/g, "$1").replace(/(?:[\r\n]+[ \t]*)+/g, " "))
                                } else {
                                    k = [];
                                    for (c = c.firstChild; c; c = c.nextSibling) D(c, k);
                                    k = k.join("")
                                }
                            k = k.replace(/(?:\r\n?|\n)$/, "");
                            m = {
                                f: k,
                                e: h,
                                b: d
                            };
                            P(m);
                            if (d = m.a)
                                if (h = m.b, "XMP" === h.tagName) {
                                    k = document.createElement("PRE");
                                    for (c = 0; c < h.attributes.length; ++c)
                                        if (n = h.attributes[c], n.specified) n.name.toLowerCase() === "class" ? k.className = n.value : k.setAttribute(n.name, n.value);
                                    k.innerHTML = d;
                                    h.parentNode.replaceChild(k, h)
                                } else h.innerHTML =
                                    d
                        }
                    }
                }
                p < l.length ? setTimeout(b, 250) : a && a()
            }
            for (var d = [document.getElementsByTagName("pre"), document.getElementsByTagName("code"), document.getElementsByTagName("xmp")], l = [], e = 0; e < d.length; ++e)
                for (var h = 0, o = d[e].length; h < o; ++h) l.push(d[e][h]);
            var d = null,
                j = Date;
            j.now || (j = {
                now: function () {
                    return (new Date).getTime()
                }
            });
            var p = 0,
                m;
            b()
        };
        window.PR = {
            combinePrefixPatterns: K,
            createSimpleLexer: y,
            registerLangHandler: o,
            sourceDecorator: r,
            PR_ATTRIB_NAME: "atn",
            PR_ATTRIB_VALUE: "atv",
            PR_COMMENT: z,
            PR_DECLARATION: "dec",
            PR_KEYWORD: N,
            PR_LITERAL: F,
            PR_NOCODE: Q,
            PR_PLAIN: v,
            PR_PUNCTUATION: B,
            PR_SOURCE: L,
            PR_STRING: x,
            PR_TAG: "tag",
            PR_TYPE: O
        }
    })();
    PR.registerLangHandler(PR.createSimpleLexer([
        ["pln", /^[ \t\r\n\f]+/, null, " \t\r\n\u000c"]
    ], [
        ["str", /^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/, null],
        ["str", /^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/, null],
        ["lang-css-str", /^url\(([^\)\"\']*)\)/i],
        ["kwd", /^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i, null],
        ["lang-css-kw", /^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],
        ["com", /^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],
        ["com", /^(?:<\!--|--\>)/],
        ["lit", /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],
        ["lit", /^#(?:[0-9a-f]{3}){1,2}/i],
        ["pln", /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],
        ["pun", /^[^\s\w\'\"]+/]
    ]), ["css"]);
    PR.registerLangHandler(PR.createSimpleLexer([], [
        ["kwd", /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]
    ]), ["css-kw"]);
    PR.registerLangHandler(PR.createSimpleLexer([], [
        ["str", /^[^\)\"\']+/]
    ]), ["css-str"]);
    PR.registerLangHandler(PR.createSimpleLexer([
        ["pln",
            /^[\t\n\r \xA0]+/, null, "\t\n\r \u00a0"
        ],
        ["str", /^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/, null, "\"'"]
    ], [
        ["com", /^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],
        ["kwd", /^(?:ADD|ALL|ALTER|AND|ANY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|NATIONAL|NOCHECK|NONCLUSTERED|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PERCENT|PLAN|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNION|UNIQUE|UPDATE|UPDATETEXT|USE|USER|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WRITETEXT)(?=[^\w-]|$)/i,
            null
        ],
        ["lit", /^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],
        ["pln", /^[a-z_][\w-]*/i],
        ["pun", /^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0+\-\"\']*/]
    ]), ["sql"]);
    $("code,td.code div.cont_code").wrapInner('<pre class="prettyprint lang-vb" />');
    // Copyright (C) 2009 Google Inc.
    //
    // Licensed under the Apache License, Version 2.0 (the "License");
    // you may not use this file except in compliance with the License.
    // You may obtain a copy of the License at
    //
    //      http://www.apache.org/licenses/LICENSE-2.0
    //
    // Unless required by applicable law or agreed to in writing, software
    // distributed under the License is distributed on an "AS IS" BASIS,
    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    // See the License for the specific language governing permissions and
    // limitations under the License.



    /**
    * @fileoverview
    * Registers a language handler for various flavors of basic.
    *
    *
    * To use, include prettify.js and this file in your HTML page.
    * Then put your code in an HTML tag like
    *      <pre class="prettyprint lang-vb"></pre>
    *
    *
    * http://msdn.microsoft.com/en-us/library/aa711638(VS.71).aspx defines the
    * visual basic grammar lexical grammar.
    *
    * @author mikesamuel@gmail.com
    */

    PR['registerLangHandler'](
        PR['createSimpleLexer'](
            [
                // Whitespace
                [PR['PR_PLAIN'], /^[\t\n\r \xA0\u2028\u2029]+/, null, '\t\n\r \xA0\u2028\u2029'],
                // A double quoted string with quotes escaped by doubling them.
                // A single character can be suffixed with C.
                [PR['PR_STRING'], /^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i, null,
                    '"\u201C\u201D'
                ],
                // A comment starts with a single quote and runs until the end of the
                // line.
                // VB6 apparently allows _ as an escape sequence for newlines though
                // this is not a documented feature of VB.net.
                // http://meta.stackoverflow.com/q/121497/137403
                [PR['PR_COMMENT'], /^[\'\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\r\n_\u2028\u2029])*/, null, '\'\u2018\u2019']
            ], [
                [PR['PR_KEYWORD'], /^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i, null],
                // A second comment form
                [PR['PR_COMMENT'], /^REM\b[^\r\n\u2028\u2029]*/i],
                // A boolean, numeric, or date literal.
                [PR['PR_LITERAL'],
                    /^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i
                ],
                // An identifier.  Keywords can be turned into identifers
                // with square brackets, and there may be optional type
                // characters after a normal identifier in square brackets.
                [PR['PR_PLAIN'], /^(?:(?:[a-z]|_\w)\w*(?:\[[%&@!#]+\])?|\[(?:[a-z]|_\w)\w*\])/i],
                // A run of punctuation
                [PR['PR_PUNCTUATION'],
                    /^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/
                ],
                // Square brackets
                [PR['PR_PUNCTUATION'], /^(?:\[|\])/]
            ]), ['vb', 'vbs']);
    prettyPrint();
});
et ça semble mieux fonctionner
Ea

Ea
Aidactif
Aidactif

Messages : 23583
Inscrit(e) le : 04/04/2008

Ea a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Mise en couleur commentaire vb ,dans colorisation syntaxique

Message par Fhoest Jeu 15 Aoû 2013 - 11:20

Bonjour,
merci, désolé de vous dire ça mais j'ai toujours le même problème.
je vais essayer de trouver une solution sur la toile pendant que vous cherchez .
Je vous remercie de ne pas laisser tomber.

A bientôt.
avatar

Fhoest
Nouveau membre

Messages : 12
Inscrit(e) le : 13/08/2013

http://programmer-en-vb.forumactif.org/
Fhoest a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Mise en couleur commentaire vb ,dans colorisation syntaxique

Message par Adam_sfp Jeu 15 Aoû 2013 - 11:34

Bonjour

Vous pouvez tester ce tutorial ICI

Cdt.
Adam_sfp

Adam_sfp
Membre actif

Masculin
Messages : 4465
Inscrit(e) le : 18/04/2008

http://antonyadam.kanak.fr
Adam_sfp a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Mise en couleur commentaire vb ,dans colorisation syntaxique

Message par Fhoest Jeu 15 Aoû 2013 - 11:54

Bonjour,
merci je viens de revenir pour dire que j'ai trouvé la solution à mon problème,je n'ai pas encore visiter le site proposé ci dessus par Adam_sfp (que je remercie au passage)

pour info pour d'autre ça peu servir le problème viens de la ligne
Code:
ea = / /g,

ceci est le bon code à remplacer l'ancienne ligne de code ci dessus sans les parenthèses
Code:
ea=($nbsp);/g,
Et maintenant le code complet
Code:
$(function () {
        window.PR_SHOULD_USE_CONTINUATION = !0;
        window.PR_TAB_WIDTH = 8;
        window.PR_normalizedHtml = window.PR = window.prettyPrintOne = window.prettyPrint = void 0;
        window._pr_isIE6 = function () {
            var w = navigator && navigator.userAgent && navigator.userAgent.match(/\bMSIE ([678])\./),
                w = w ? +w[1] : !1;
            window._pr_isIE6 = function () {
                return w
            };
            return w
        };
        (function () {
            function w(a) {
                return a.replace(H, "&amp;").replace(I, "<").replace(J, ">")
            }

            function D(a, b, d) {
                switch (a.nodeType) {
                case 1:
                    var l = a.tagName.toLowerCase();
                    b.push("<",
                        l);
                    var e = a.attributes,
                        h = e.length;
                    if (h) {
                        if (d) {
                            for (var u = [], j = h; --j >= 0;) u[j] = e[j];
                            u.sort(function (a, b) {
                                return a.name < b.name ? -1 : a.name === b.name ? 0 : 1
                            });
                            e = u
                        }
                        for (j = 0; j < h; ++j) u = e[j], u.specified && b.push(" ", u.name.toLowerCase(), '="', u.value.replace(H, "&amp;").replace(I, "<").replace(J, ">").replace(S, """), '"')
                    }
                    b.push(">");
                    for (e = a.firstChild; e; e = e.nextSibling) D(e, b, d);
                    (a.firstChild || !/^(?:br|link|img)$/.test(l)) && b.push("</", l, ">");
                    break;
                case 3:
                case 4:
                    b.push(w(a.nodeValue))
                }
            }

            function K(a) {
                function b(a) {
                    if (a.charAt(0) !==
                        "\\") return a.charCodeAt(0);
                    switch (a.charAt(1)) {
                    case "b":
                        return 8;
                    case "t":
                        return 9;
                    case "n":
                        return 10;
                    case "v":
                        return 11;
                    case "f":
                        return 12;
                    case "r":
                        return 13;
                    case "u":
                    case "x":
                        return parseInt(a.substring(2), 16) || a.charCodeAt(1);
                    case "0":
                    case "1":
                    case "2":
                    case "3":
                    case "4":
                    case "5":
                    case "6":
                    case "7":
                        return parseInt(a.substring(1), 8);
                    default:
                        return a.charCodeAt(1)
                    }
                }

                function d(a) {
                    if (a < 32) return (a < 16 ? "\\x0" : "\\x") + a.toString(16);
                    a = String.fromCharCode(a);
                    if (a === "\\" || a === "-" || a === "[" || a === "]") a = "\\" +
                        a;
                    return a
                }

                function l(a) {
                    for (var k = a.substring(1, a.length - 1).match(RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]", "g")), a = [], c = [], j = k[0] === "^", f = j ? 1 : 0, i = k.length; f < i; ++f) {
                        var g = k[f];
                        switch (g) {
                        case "\\B":
                        case "\\b":
                        case "\\D":
                        case "\\d":
                        case "\\S":
                        case "\\s":
                        case "\\W":
                        case "\\w":
                            a.push(g);
                            continue
                        }
                        var g = b(g),
                            e;
                        f + 2 < i && "-" === k[f + 1] ? (e = b(k[f + 2]), f += 2) : e = g;
                        c.push([g, e]);
                        e < 65 || g > 122 || (e < 65 || g > 90 || c.push([Math.max(65, g) | 32, Math.min(e, 90) | 32]),
                            e < 97 || g > 122 || c.push([Math.max(97, g) & -33, Math.min(e, 122) & -33]))
                    }
                    c.sort(function (a, c) {
                        return a[0] - c[0] || c[1] - a[1]
                    });
                    k = [];
                    g = [NaN, NaN];
                    for (f = 0; f < c.length; ++f) i = c[f], i[0] <= g[1] + 1 ? g[1] = Math.max(g[1], i[1]) : k.push(g = i);
                    c = ["["];
                    j && c.push("^");
                    c.push.apply(c, a);
                    for (f = 0; f < k.length; ++f) i = k[f], c.push(d(i[0])), i[1] > i[0] && (i[1] + 1 > i[0] && c.push("-"), c.push(d(i[1])));
                    c.push("]");
                    return c.join("")
                }

                function e(a) {
                    for (var b = a.source.match(RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)",
                        "g")), c = b.length, e = [], f = 0, i = 0; f < c; ++f) {
                        var g = b[f];
                        if (g === "(")++i;
                        else if ("\\" === g.charAt(0) && (g = +g.substring(1)) && g <= i) e[g] = -1
                    }
                    for (f = 1; f < e.length; ++f) - 1 === e[f] && (e[f] = ++h);
                    for (i = f = 0; f < c; ++f)
                        if (g = b[f], g === "(")++i, e[i] === void 0 && (b[f] = "(?:");
                    else if ("\\" === g.charAt(0) && (g = +g.substring(1)) && g <= i) b[f] = "\\" + e[i];
                    for (i = f = 0; f < c; ++f) "^" === b[f] && "^" !== b[f + 1] && (b[f] = "");
                    if (a.ignoreCase && u)
                        for (f = 0; f < c; ++f) g = b[f], a = g.charAt(0), g.length >= 2 && a === "[" ? b[f] = l(g) : a !== "\\" && (b[f] = g.replace(/[a-zA-Z]/g, function (a) {
                            a =
                                a.charCodeAt(0);
                            return "[" + String.fromCharCode(a & -33, a | 32) + "]"
                        }));
                    return b.join("")
                }
                for (var h = 0, u = !1, j = !1, p = 0, m = a.length; p < m; ++p) {
                    var s = a[p];
                    if (s.ignoreCase) j = !0;
                    else if (/[a-z]/i.test(s.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ""))) {
                        u = !0;
                        j = !1;
                        break
                    }
                }
                for (var q = [], p = 0, m = a.length; p < m; ++p) {
                    s = a[p];
                    if (s.global || s.multiline) throw Error("" + s);
                    q.push("(?:" + e(s) + ")")
                }
                return RegExp(q.join("|"), j ? "gi" : "g")
            }

            function T(a) {
                var b = 0;
                return function (d) {
                    for (var l = null, e = 0, h = 0, u = d.length; h < u; ++h) switch (d.charAt(h)) {
                    case "\t":
                        l ||
                            (l = []);
                        l.push(d.substring(e, h));
                        e = a - b % a;
                        for (b += e; e >= 0; e -= 16) l.push("                ".substring(0, e));
                        e = h + 1;
                        break;
                    case "\n":
                        b = 0;
                        break;
                    default:
                        ++b
                    }
                    if (!l) return d;
                    l.push(d.substring(e));
                    return l.join("")
                }
            }

            function E(a, b, d, l) {
                b && (a = {
                    source: b,
                    c: a
                }, d(a), l.push.apply(l, a.d))
            }

            function y(a, b) {
                function d(a) {
                    for (var j = a.c, p = [j, v], m = 0, s = a.source.match(e) || [], q = {}, t = 0, k = s.length; t < k; ++t) {
                        var c = s[t],
                            n = q[c],
                            f = void 0,
                            i;
                        if (typeof n === "string") i = !1;
                        else {
                            var g = l[c.charAt(0)];
                            if (g) f = c.match(g[1]), n = g[0];
                            else {
                                for (i =
                                    0; i < h; ++i)
                                    if (g = b[i], f = c.match(g[1])) {
                                        n = g[0];
                                        break
                                    }
                                f || (n = v)
                            } if ((i = n.length >= 5 && "lang-" === n.substring(0, 5)) && !(f && typeof f[1] === "string")) i = !1, n = L;
                            i || (q[c] = n)
                        }
                        g = m;
                        m += c.length;
                        if (i) {
                            i = f[1];
                            var o = c.indexOf(i),
                                r = o + i.length;
                            f[2] && (r = c.length - f[2].length, o = r - i.length);
                            n = n.substring(5);
                            E(j + g, c.substring(0, o), d, p);
                            E(j + g + o, i, M(n, i), p);
                            E(j + g + r, c.substring(r), d, p)
                        } else p.push(j + g, n)
                    }
                    a.d = p
                }
                var l = {}, e;
                (function () {
                    for (var d = a.concat(b), j = [], h = {}, m = 0, s = d.length; m < s; ++m) {
                        var q = d[m],
                            t = q[3];
                        if (t)
                            for (var k = t.length; --k >=
                                0;) l[t.charAt(k)] = q;
                        q = q[1];
                        t = "" + q;
                        h.hasOwnProperty(t) || (j.push(q), h[t] = null)
                    }
                    j.push(/[\0-\uffff]/);
                    e = K(j)
                })();
                var h = b.length;
                return d
            }

            function r(a) {
                var b = [],
                    d = [];
                a.tripleQuotedStrings ? b.push([x, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\""]) : a.multiLineStrings ? b.push([x, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
                    null, "'\"`"
                ]) : b.push([x, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'"]);
                a.verbatimStrings && d.push([x, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
                a.hashComments && (a.cStyleComments ? (b.push([z, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/, null, "#"]), d.push([x, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/, null])) : b.push([z, /^#[^\r\n]*/, null, "#"]));
                a.cStyleComments && (d.push([z, /^\/\/[^\r\n]*/, null]),
                    d.push([z, /^\/\*[\s\S]*?(?:\*\/|$)/, null]));
                a.regexLiterals && d.push(["lang-regex", RegExp("^" + U + "(/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/)")]);
                a = a.keywords.replace(/^\s+|\s+$/g, "");
                a.length && d.push([N, RegExp("^(?:" + a.replace(/\s+/g, "|") + ")\\b"), null]);
                b.push([v, /^\s+/, null, " \r\n\t\u00a0"]);
                d.push([F, /^@[a-z_$][a-z_$@0-9]*/i, null], [O, /^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/, null], [v, /^[a-z_$][a-z_$@0-9]*/i, null], [F, /^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,
                    null, "0123456789"
                ], [B, /^.[^\s\w\.$@\'\"\`\/\#]*/, null]);
                return y(b, d)
            }

            function V(a) {
                function b(a) {
                    if (a > u) {
                        j && j !== p && (h.push("</span>"), j = null);
                        !j && p && (j = p, h.push('<span class="', j, '">'));
                        var b = w(q(d.substring(u, a))).replace(f ? k : t, "$1 ");
                        f = n.test(b);
                        h.push(b.replace(c, o));
                        u = a
                    }
                }
                var d = a.source,
                    l = a.g,
                    e = a.d,
                    h = [],
                    u = 0,
                    j = null,
                    p = null,
                    m = 0,
                    s = 0,
                    q = T(window.PR_TAB_WIDTH),
                    t = /([\r\n ]) /g,
                    k = /(^| ) /gm,
                    c = /\r\n?|\n/g,
                    n = /[ \r\n]$/,
                    f = !0,
                    i = window._pr_isIE6(),
                    i = i ? a.b.tagName === "PRE" ? i === 6 ? " \r\n" : i === 7 ? " <br>\r" :
                        " \r" : " <br />" : "<br />",
                    g = a.b.className.match(/\blinenums\b(?::(\d+))?/),
                    o;
                if (g) {
                    for (var r = [], A = 0; A < 10; ++A) r[A] = i + '</li><li class="L' + A + '">';
                    var v = g[1] && g[1].length ? g[1] - 1 : 0;
                    h.push('<ol class="linenums"><li class="L', v % 10, '"');
                    v && h.push(' value="', v + 1, '"');
                    h.push(">");
                    o = function () {
                        var a = r[++v % 10];
                        return j ? "</span>" + a + '<span class="' + j + '">' : a
                    }
                } else o = i;
                for (;;)
                    if (m < l.length && (s < e.length ? l[m] <= e[s] : 1)) b(l[m]), j && (h.push("</span>"), j = null), h.push(l[m + 1]), m += 2;
                    else if (s < e.length) b(e[s]), p = e[s +
                    1], s += 2;
                else break;
                b(d.length);
                j && h.push("</span>");
                g && h.push("</li></ol>");
                a.a = h.join("")
            }

            function o(a, b) {
                for (var d = b.length; --d >= 0;) {
                    var l = b[d];
                    C.hasOwnProperty(l) ? "console" in window && console.warn("cannot override language handler %s", l) : C[l] = a
                }
            }

            function M(a, b) {
                a && C.hasOwnProperty(a) || (a = /^\s*</.test(b) ? "default-markup" : "default-code");
                return C[a]
            }

            function P(a) {
                var b = a.f,
                    d = a.e;
                a.a = b;
                try {
                    var l, e = b.match(W),
                        b = [],
                        h = 0,
                        o = [];
                    if (e)
                        for (var j = 0, p = e.length; j < p; ++j) {
                            var m = e[j];
                            if (m.length > 1 && m.charAt(0) ===
                                "<") {
                                if (!X.test(m))
                                    if (Y.test(m)) b.push(m.substring(9, m.length - 3)), h += m.length - 12;
                                    else if (Z.test(m)) b.push("\n"), ++h;
                                else if (m.indexOf(Q) >= 0 && m.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g, ' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)) {
                                    var s = m.match(R)[2],
                                        q = 1,
                                        t;
                                    t = j + 1;
                                    a: for (; t < p; ++t) {
                                        var k = e[t].match(R);
                                        if (k && k[2] === s)
                                            if (k[1] === "/") {
                                                if (--q === 0) break a
                                            } else ++q
                                    }
                                    t < p ? (o.push(h, e.slice(j, t + 1).join("")), j = t) : o.push(h, m)
                                } else o.push(h, m)
                            } else {
                                var c, q = m,
                                    n = q.indexOf("&");
                                if (n <
                                    0) c = q;
                                else {
                                    for (--n;
                                        (n = q.indexOf("&#", n + 1)) >= 0;) {
                                        var f = q.indexOf(";", n);
                                        if (f >= 0) {
                                            var i = q.substring(n + 3, f),
                                                g = 10;
                                            i && i.charAt(0) === "x" && (i = i.substring(1), g = 16);
                                            var r = parseInt(i, g);
                                            isNaN(r) || (q = q.substring(0, n) + String.fromCharCode(r) + q.substring(f + 1))
                                        }
                                    }
                                    c = q.replace(aa, "<").replace(ba, ">").replace(ca, "'").replace(da, '"').replace(ea, " ").replace(fa, "&")
                                }
                                b.push(c);
                                h += c.length
                            }
                        }
                    l = {
                        source: b.join(""),
                        h: o
                    };
                    var v = l.source;
                    a.source = v;
                    a.c = 0;
                    a.g = l.h;
                    M(d, v)(a);
                    V(a)
                } catch (w) {
                    "console" in window && console.log(w && w.stack ?
                        w.stack : w)
                }
            }
            var x = "str",
                N = "kwd",
                z = "com",
                O = "typ",
                F = "lit",
                B = "pun",
                v = "pln",
                L = "src",
                Q = "nocode",
                U = function () {
                    for (var a = ["!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=", "&=", "(", "*", "*=", "+=", ",", "-=", "->", "/", "/=", ":", "::", ";", "<", "<<", "<<=", "<=", "=", "==", "===", ">", ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[", "^", "^=", "^^", "^^=", "{", "|", "|=", "||", "||=", "~", "break", "case", "continue", "delete", "do", "else", "finally", "instanceof", "return", "throw", "try", "typeof"], b = "(?:^^|[+-]", d = 0; d < a.length; ++d) b += "|" + a[d].replace(/([^=<>:&a-z])/g,
                        "\\$1");
                    b += ")\\s*";
                    return b
                }(),
                H = /&/g,
                I = /</g,
                J = />/g,
                S = /\"/g,
                aa = /</g,
                ba = />/g,
                ca = /&apos;/g,
                da = /"/g,
                fa = /&amp;/g,
                ea=/ /g,
 ga = /[\r\n]/g,
                G = null,
                W = RegExp("[^<]+|<\!--[\\s\\S]*?--\>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z](?:[^>\"']|'[^']*'|\"[^\"]*\")*>|<", "g"),
                X = /^<\!--/,
                Y = /^<!\[CDATA\[/,
                Z = /^<br\b/i,
                R = /^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/,
                ha = r({
                    keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END break continue do else for if return while case done elif esac eval fi function in local set then until ",
                    hashComments: !0,
                    cStyleComments: !0,
                    multiLineStrings: !0,
                    regexLiterals: !0
                }),
                C = {};
            o(ha, ["default-code"]);
            o(y([], [
                [v, /^[^<?]+/],
                ["dec", /^<!\w[^>]*(?:>|$)/],
                [z, /^<\!--[\s\S]*?(?:-\->|$)/],
                ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/],
                ["lang-", /^<%([\s\S]+?)(?:%>|$)/],
                [B, /^(?:<[%?]|[%?]>)/],
                ["lang-", /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
                ["lang-js", /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
                ["lang-css", /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
                ["lang-sql", /^<sql>([\s\S]*?)(<\/sql>)/i],
                ["lang-in.tag",
                    /^(<\/?[a-z][^<>]*>)/i
                ]
            ]), ["default-markup", "htm", "html", "mxml", "xhtml", "xml", "xsl"]);
            o(y([
                [v, /^[\s]+/, null, " \t\r\n"],
                ["atv", /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, "\"'"]
            ], [
                ["tag", /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
                ["atn", /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
                ["lang-uq.val", /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
                [B, /^[=<>\/]+/],
                ["lang-js", /^on\w+\s*=\s*\"([^\"]+)\"/i],
                ["lang-js", /^on\w+\s*=\s*\'([^\']+)\'/i],
                ["lang-js", /^on\w+\s*=\s*([^\"\'>\s]+)/i],
                ["lang-css", /^style\s*=\s*\"([^\"]+)\"/i],
                ["lang-css", /^style\s*=\s*\'([^\']+)\'/i],
                ["lang-css", /^style\s*=\s*([^\"\'>\s]+)/i]
            ]), ["in.tag"]);
            o(y([], [
                ["atv", /^[\s\S]+/]
            ]), ["uq.val"]);
            o(r({
                keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where ",
                hashComments: !0,
                cStyleComments: !0
            }), ["c", "cc", "cpp", "cxx", "cyc", "m"]);
            o(r({
                keywords: "null true false"
            }), ["json"]);
            o(r({
                keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",
                hashComments: !0,
                cStyleComments: !0,
                verbatimStrings: !0
            }), ["cs"]);
            o(r({
                keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",
                cStyleComments: !0
            }), ["java"]);
            o(r({
                keywords: "break continue do else for if return while case done elif esac eval fi function in local set then until ",
                hashComments: !0,
                multiLineStrings: !0
            }), ["bsh", "csh", "sh"]);
            o(r({
                keywords: "break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ",
                hashComments: !0,
                multiLineStrings: !0,
                tripleQuotedStrings: !0
            }), ["cv", "py"]);
            o(r({
                keywords: "caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ",
                hashComments: !0,
                multiLineStrings: !0,
                regexLiterals: !0
            }), ["perl", "pl", "pm"]);
            o(r({
                keywords: "break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ",
                hashComments: !0,
                multiLineStrings: !0,
                regexLiterals: !0
            }), ["rb"]);
            o(r({
                keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN ",
                cStyleComments: !0,
                regexLiterals: !0
            }), ["js"]);
            o(y([], [
                [x, /^[\s\S]+/]
            ]), ["regex"]);
            window.PR_normalizedHtml = D;
            window.prettyPrintOne = function (a, b) {
                var d = {
                    f: a,
                    e: b
                };
                P(d);
                return d.a
            };
            window.prettyPrint = function (a) {
                function b() {
                    for (var e = window.PR_SHOULD_USE_CONTINUATION ? j.now() + 250 : Infinity; p < l.length && j.now() < e; p++) {
                        var d = l[p];
                        if (d.className && d.className.indexOf("prettyprint") >= 0) {
                            var h = d.className.match(/\blang-(\w+)\b/);
                            h && (h = h[1]);
                            for (var k = !1, c = d.parentNode; c; c = c.parentNode)
                                if ((c.tagName === "pre" ||
                                    c.tagName === "code" || c.tagName === "xmp") && c.className && c.className.indexOf("prettyprint") >= 0) {
                                    k = !0;
                                    break
                                }
                            if (!k) {
                                c = d;
                                null === G && (k = document.createElement("PRE"), k.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />')), G = !/</.test(k.innerHTML));
                                if (G)
                                    if (k = c.innerHTML, "XMP" === c.tagName) k = w(k);
                                    else {
                                        if ("PRE" === c.tagName) c = !0;
                                        else if (ga.test(k)) {
                                            var n = "";
                                            if (c.currentStyle) n = c.currentStyle.whiteSpace;
                                            else if (window.getComputedStyle) n = window.getComputedStyle(c, null).whiteSpace;
                                            c = !n ||
                                                n === "pre"
                                        } else c = !0;
                                        c || (k = k.replace(/(<br\s*\/?>)[\r\n]+/g, "$1").replace(/(?:[\r\n]+[ \t]*)+/g, " "))
                                    } else {
                                        k = [];
                                        for (c = c.firstChild; c; c = c.nextSibling) D(c, k);
                                        k = k.join("")
                                    }
                                k = k.replace(/(?:\r\n?|\n)$/, "");
                                m = {
                                    f: k,
                                    e: h,
                                    b: d
                                };
                                P(m);
                                if (d = m.a)
                                    if (h = m.b, "XMP" === h.tagName) {
                                        k = document.createElement("PRE");
                                        for (c = 0; c < h.attributes.length; ++c)
                                            if (n = h.attributes[c], n.specified) n.name.toLowerCase() === "class" ? k.className = n.value : k.setAttribute(n.name, n.value);
                                        k.innerHTML = d;
                                        h.parentNode.replaceChild(k, h)
                                    } else h.innerHTML =
                                        d
                            }
                        }
                    }
                    p < l.length ? setTimeout(b, 250) : a && a()
                }
                for (var d = [document.getElementsByTagName("pre"), document.getElementsByTagName("code"), document.getElementsByTagName("xmp")], l = [], e = 0; e < d.length; ++e)
                    for (var h = 0, o = d[e].length; h < o; ++h) l.push(d[e][h]);
                var d = null,
                    j = Date;
                j.now || (j = {
                    now: function () {
                        return (new Date).getTime()
                    }
                });
                var p = 0,
                    m;
                b()
            };
            window.PR = {
                combinePrefixPatterns: K,
                createSimpleLexer: y,
                registerLangHandler: o,
                sourceDecorator: r,
                PR_ATTRIB_NAME: "atn",
                PR_ATTRIB_VALUE: "atv",
                PR_COMMENT: z,
                PR_DECLARATION: "dec",
                PR_KEYWORD: N,
                PR_LITERAL: F,
                PR_NOCODE: Q,
                PR_PLAIN: v,
                PR_PUNCTUATION: B,
                PR_SOURCE: L,
                PR_STRING: x,
                PR_TAG: "tag",
                PR_TYPE: O
            }
        })();
        PR.registerLangHandler(PR.createSimpleLexer([
            ["pln", /^[ \t\r\n\f]+/, null, " \t\r\n\u000c"]
        ], [
            ["str", /^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/, null],
            ["str", /^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/, null],
            ["lang-css-str", /^url\(([^\)\"\']*)\)/i],
            ["kwd", /^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i, null],
            ["lang-css-kw", /^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],
            ["com", /^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],
            ["com", /^(?:<\!--|--\>)/],
            ["lit", /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],
            ["lit", /^#(?:[0-9a-f]{3}){1,2}/i],
            ["pln", /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],
            ["pun", /^[^\s\w\'\"]+/]
        ]), ["css"]);
        PR.registerLangHandler(PR.createSimpleLexer([], [
            ["kwd", /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]
        ]), ["css-kw"]);
        PR.registerLangHandler(PR.createSimpleLexer([], [
            ["str", /^[^\)\"\']+/]
        ]), ["css-str"]);
        PR.registerLangHandler(PR.createSimpleLexer([
            ["pln",
                /^[\t\n\r \xA0]+/, null, "\t\n\r \u00a0"
            ],
            ["str", /^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/, null, "\"'"]
        ], [
            ["com", /^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],
            ["kwd", /^(?:ADD|ALL|ALTER|AND|ANY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|NATIONAL|NOCHECK|NONCLUSTERED|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PERCENT|PLAN|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNION|UNIQUE|UPDATE|UPDATETEXT|USE|USER|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WRITETEXT)(?=[^\w-]|$)/i,
                null
            ],
            ["lit", /^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],
            ["pln", /^[a-z_][\w-]*/i],
            ["pun", /^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0+\-\"\']*/]
        ]), ["sql"]);
        window.PR['registerLangHandler'](
            window.PR['createSimpleLexer'](
                [
                    // Whitespace
                    [window.PR['PR_PLAIN'], /^[\t\n\r \xA0\u2028\u2029]+/, null, '\t\n\r \xA0\u2028\u2029'],
                    // A double quoted string with quotes escaped by doubling them.
                    // A single character can be suffixed with C.
                    [window.PR['PR_STRING'], /^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i, null,
                        '"\u201C\u201D'
                    ],
                    // A comment starts with a single quote and runs until the end of the
                    // line.
                    // VB6 apparently allows _ as an escape sequence for newlines though
                    // this is not a documented feature of VB.net.
                    // http://meta.stackoverflow.com/q/121497/137403
                    [window.PR['PR_COMMENT'], /^[\'\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\r\n_\u2028\u2029])*/, null, '\'\u2018\u2019']
                ], [
                    [window.PR['PR_KEYWORD'], /^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i, null],
                    // A second comment form
                    [window.PR['PR_COMMENT'], /^REM\b[^\r\n\u2028\u2029]*/i],
                    // A boolean, numeric, or date literal.
                    [window.PR['PR_LITERAL'],
                        /^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i
                    ],
                    // An identifier.  Keywords can be turned into identifers
                    // with square brackets, and there may be optional type
                    // characters after a normal identifier in square brackets.
                    [window.PR['PR_PLAIN'], /^(?:(?:[a-z]|_\w)\w*(?:\[[%&@!#]+\])?|\[(?:[a-z]|_\w)\w*\])/i],
                    // A run of punctuation
                    [window.PR['PR_PUNCTUATION'],
                        /^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/
                    ],
                    // Square brackets
                    [window.PR['PR_PUNCTUATION'], /^(?:\[|\])/]
                ]), ['vb', 'vbs']);
        $("code,td.code div.cont_code").wrapInner('<pre class="prettyprint lang-vb" />');
        prettyPrint();
    });
Un grand merci à EA_aideactif et Adam_sfp

Remarque après avoir mis le code ici dans la balise code j'ai remarqué que le code espace ($nbsp); est devenu / /g
peut être qu'au départ le code que EA_aideactif était correct et en le collant dans la balise code il a été transformé en : / /g;
A suivre...
A bientôt.
avatar

Fhoest
Nouveau membre

Messages : 12
Inscrit(e) le : 13/08/2013

http://programmer-en-vb.forumactif.org/
Fhoest a été remercié(e) par l'auteur de ce sujet.

Voir le sujet précédent Voir le sujet suivant Revenir en haut

- Sujets similaires

Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum