Subversion Repositories pub

Compare Revisions

Ignore whitespace Rev 113 → Rev 114

/wp-js-syntax-highlighter/branches/0.4.2+3.0.83/loader.full.js
14,6 → 14,9
* When shLoader is initialised it will look for the "brush:" class and load
* the appropriate shBrush.
*
* Additionally, you can use "syntax-highlight language" for compatibility with older
* versions of this plugin
*
* Initialisation:
* shLoader.init() // Only if located at the root of the server
* shLoader.init({path: '/mydir/wp-content/plugins/js-syntax-highlighter'})
127,6 → 130,11
this.configObj = obj;
}, // }}} // setConfig
detectLanguages: function() { // {{{ // Find any language used in the page
// Replace .syntax-highlight, used in older versions
jQuery('.syntax-highlight').each(function() {
var cn = jQuery(this).attr('class');
jQuery(this).attr('class', cn.replace(/syntax-highlight ?/, 'syntax-highlight brush:/')
});
var detected = [];
var re = /brush: ?(\w+)/i;
//jQuery('.brush\\:') would not match stuff like 'brush:css' (but it will match 'brush: css')