I have the following code:
$.fn.addTemplateSetup(function () {
this.find('pre').each(function (i) {
SyntaxHighlighter.highlight({}, this);
});
});
It finds each element and then runs SyntaxHighlighter on it.
Before highlighter runs I want to change each <pre> that is inside a <div> with a class of text into <pre class='brush: plain'>
Should I do this inside the first function, should i use another this.find?
Try this:
Or