example/public/ueditor/third-party/SyntaxHighlighter/shCore.js
function(globalParams, element)
        {
            var elements = element ? [element] : toArray(document.getElementsByTagName(sh.config.tagName)),
                conf = sh.config,
                result = []
                ;

            // support for <SCRIPT TYPE="syntaxhighlighter" /> feature
            if (conf.useScriptTags)
                elements = elements.concat(getSyntaxHighlighterScriptTags());

            if (elements.length === 0)
                return result;

            for (var i = 0; i < elements.length; i++)
            {
                var item = {
                    target: elements[i],
                    // local params take precedence over globals
                    params: merge(globalParams, parseParams(elements[i].className))
                };

                if (item.params['brush'] == null)
                    continue;

                result.push(item);
            }

            return result;
        }
function(globalParams, element)
        {
            var elements = element ? [element] : toArray(document.getElementsByTagName(sh.config.tagName)),
                conf = sh.config,
                result = []
                ;

            // support for <SCRIPT TYPE="syntaxhighlighter" /> feature
            if (conf.useScriptTags)
                elements = elements.concat(getSyntaxHighlighterScriptTags());

            if (elements.length === 0)
                return result;

            for (var i = 0; i < elements.length; i++)
            {
                var item = {
                    target: elements[i],
                    // local params take precedence over globals
                    params: merge(globalParams, parseParams(elements[i].className))
                };

                if (item.params['brush'] == null)
                    continue;

                result.push(item);
            }

            return result;
        }
function ( globalParams , element ) { var elements = element ? [ element ] : toArray ( document . getElementsByTagName ( sh . config . tagName ) ) , conf = sh . config , result = [ ] ; // support for <SCRIPT TYPE="syntaxhighlighter" /> feature if ( conf . useScriptTags ) elements = elements . concat ( getSyntaxHighlighterScriptTags ( ) ) ; if ( elements . length === 0 ) return result ; for ( var i = 0 ; i < elements . length ; i ++ ) { var item = { target : elements [ i ] , // local params take precedence over globals params : merge ( globalParams , parseParams ( elements [ i ] . className ) ) } ; if ( item . params [ 'brush' ] == null ) continue ; result . push ( item ) ; } return result ; }
Finds all elements on the page which should be processes by SyntaxHighlighter.

@param {Object} globalParams		Optional parameters which override element's
parameters. Only used if element is specified.

@param {Object} element	Optional element to highlight. If none is
provided, all elements in the current document
are returned which qualify.

@return {Array}	Returns list of <code>{ target: DOMElement, params: Object }</code> objects.
Finds all elements on the page which should be processes by SyntaxHighlighter .