Skip to content

Commit 7b20776

Browse files
committed
Disable Highlight on mermaid objects
1 parent fd2a19c commit 7b20776

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

static/js/learn.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ jQuery(document).ready(function() {
229229
e.stopPropagation();
230230
}
231231
});
232-
232+
233233
jQuery(document).keydown(function(e) {
234234
// prev links - left arrow key
235235
if(e.which == '37') {
@@ -264,7 +264,7 @@ jQuery(document).ready(function() {
264264
});
265265
}
266266

267-
/**
267+
/**
268268
* Fix anchor scrolling that hides behind top nav bar
269269
* Courtesy of https://stackoverflow.com/a/13067009/28106
270270
*
@@ -346,7 +346,7 @@ jQuery(document).ready(function() {
346346

347347
$(document).ready($.proxy(anchorScrolls, 'init'));
348348
})(window.document, window.history, window.location);
349-
349+
350350
});
351351

352352
jQuery(window).on('load', function() {
@@ -388,7 +388,7 @@ jQuery.extend({
388388
highlight: function(node, re, nodeName, className) {
389389
if (node.nodeType === 3) {
390390
var match = node.data.match(re);
391-
if (match) {
391+
if (match && !$(node.parentNode).hasClass("mermaid")) {
392392
var highlight = document.createElement(nodeName || 'span');
393393
highlight.className = className || 'highlight';
394394
var wordNode = node.splitText(match.index);

0 commit comments

Comments
 (0)