From 45968657cb3d1f19a0dab3fc2bd8e23447c3d3ec Mon Sep 17 00:00:00 2001 From: Liviu-Mihail Concioiu Date: Sat, 21 Feb 2026 03:00:15 +0100 Subject: [PATCH] Show sql-highlight div only if CodeMirror is enabled Signed-off-by: Liviu-Mihail Concioiu --- js/src/functions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);