2 * Utility for performing syntax highlighting.
4 Ext.define("Docs.Syntax", {
8 * Marks all code blocks with "prettyprint" class and then calls
9 * the prettify library function to highlight them.
11 * @param {HTMLElement/Ext.core.Element} root HTML element inside
12 * which to perform the highlighting.
14 highlight: function(root) {
15 Ext.Array.forEach(Ext.query("pre > code", root.dom || root), function(el) {
16 Ext.get(el).addCls("prettyprint");