summaryrefslogtreecommitdiffstats
path: root/js/field.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/field.js')
-rw-r--r--js/field.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/field.js b/js/field.js
index 063d48c47..5ec7574bc 100644
--- a/js/field.js
+++ b/js/field.js
@@ -949,6 +949,14 @@ function show_comment_preview(bug_id, refresh) {
last_comment_text = comment.value;
last_markdown_cb_value = markdown_cb.checked;
}
+ if (markdown_cb.checked) {
+ var pres = document.getElementById('comment_preview_text').getElementsByTagName("pre");
+ for (var i = 0, l = pres.length; i < l; i++) {
+ if (pres[i].firstChild && pres[i].firstChild.tagName == "CODE") {
+ hljs.highlightBlock(pres[i].firstChild);
+ }
+ }
+ }
},
failure: function(res) {
Dom.addClass('comment_preview_loading', 'bz_default_hidden');