Commit 480e99d9 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Disable inline examples in IE.

parent b1207f38
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -12,11 +12,16 @@ Ext.define("Docs.Syntax", {
     * which to perform the highlighting.
     */
    highlight: function(root) {
        Ext.Array.forEach(Ext.query("pre > code", root.dom || root), function(el) {
            el = Ext.get(el);
        Ext.Array.forEach(Ext.query("pre > code", root.dom || root), function(code) {
            code = Ext.get(code);
            var pre = code.parent();
            // Disable inline examples in IE (too slow)
            if (Ext.isIE && pre.hasCls("inline-example")) {
                pre.removeCls("inline-example");
            }
            // Don't prettify inline examples, these are highlighted anyway
            if (!el.parent().hasCls("inline-example")) {
                el.addCls("prettyprint");
            if (!pre.hasCls("inline-example")) {
                code.addCls("prettyprint");
            }
        });
        prettyPrint();