diff --git a/js/src/functions.js b/js/src/functions.js index ce9532f20c..d617e484e2 100644 --- a/js/src/functions.js +++ b/js/src/functions.js @@ -1718,9 +1718,9 @@ Functions.highlightSql = function ($base) { var $pre = $sql.find('pre'); /* We only care about visible elements to avoid double processing */ if ($pre.is(':visible')) { - var $highlight = $('
'); - $sql.append($highlight); if (typeof CodeMirror !== 'undefined') { + var $highlight = $(''); + $sql.append($highlight); CodeMirror.runMode($sql.text(), 'text/x-mysql', $highlight[0]); $pre.hide(); $highlight.find('.cm-keyword').each(Functions.documentationKeyword);