2 * JSON syntax highlighting transformation plugin
4 AJAX.registerOnload('transformations/json.js', function () {
5 var $elm = $('#page_content').find('code.json');
6 $elm.each(function () {
8 var $pre = $json.find('pre');
9 /* We only care about visible elements to avoid double processing */
10 if ($pre.is(':visible')) {
11 var $highlight = $('<div class="json-highlight cm-s-default"></div>');
12 $json.append($highlight);
13 CodeMirror.runMode($json.text(), 'application/json', $highlight[0]);