diff --git a/js/functions.js b/js/functions.js index c3a9c1ea87..7fdbefe5b6 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1496,13 +1496,14 @@ function PMA_highlightSQL(base) var $elm = base.find('code.sql'); $elm.each(function () { var $sql = $(this); + var $pre = $sql.find('pre'); /* We only care about visible elements to avoid double processing */ - if ($sql.is(":visible")) { + if ($pre.is(":visible")) { var $highlight = $('
'); $sql.append($highlight); console.log('Highlight SQL: ' + $sql.text()); CodeMirror.runMode($sql.text(), 'text/x-mysql', $highlight[0]); - $sql.find('pre').hide(); + $pre.hide(); } }); }