Sha256: 34bf8afc522dc7e1fc709f4a5b301becf325c25299c9aa65c4742696f15d5826

Contents?: true

Size: 573 Bytes

Versions: 3

Compression:

Stored size: 573 Bytes

Contents

/**
 * Utility for performing syntax highlighting.
 */
Ext.define("Docs.Syntax", {
    singleton: true,

    /**
     * Marks all code blocks with "prettyprint" class and then calls
     * the prettify library function to highlight them.
     *
     * @param {HTMLElement/Ext.core.Element} root HTML element inside
     * which to perform the highlighting.
     */
    highlight: function(root) {
        Ext.Array.forEach(Ext.query("pre > code", root.dom || root), function(el) {
            Ext.get(el).addCls("prettyprint");
        });
        prettyPrint();
    }
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jsduck-2.0.pre4 template/app/Syntax.js
jsduck-2.0.pre2 template/app/Syntax.js
jsduck-2.0.pre template/app/Syntax.js