mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-06-20 07:40:32 +00:00
theme: ensure IE11 compatiblity #89
This commit is contained in:
parent
82b7477c0c
commit
b5e90f03dd
3 changed files with 5 additions and 5 deletions
static/js
|
@ -104,7 +104,7 @@ function initMermaid() {
|
|||
$(element).parent().replaceWith('<div class="mermaid" align="center">' + content + '</div>');
|
||||
});
|
||||
|
||||
if (mermaid) {
|
||||
if (typeof mermaid != 'undefined') {
|
||||
mermaid.mermaidAPI.initialize( Object.assign( {}, mermaid.mermaidAPI.getSiteConfig(), { startOnLoad: true } ) );
|
||||
mermaid.contentLoaded();
|
||||
$(".mermaid svg").svgPanZoom({})
|
||||
|
@ -538,7 +538,7 @@ jQuery(function() {
|
|||
|
||||
jQuery.extend({
|
||||
highlight: function(node, re, nodeName, className) {
|
||||
if (node.nodeType === 3 && node.parentElement.namespaceURI == 'http://www.w3.org/1999/xhtml') { // text nodes
|
||||
if (node.nodeType === 3 && node.parentElement && node.parentElement.namespaceURI == 'http://www.w3.org/1999/xhtml') { // text nodes
|
||||
var match = node.data.match(re);
|
||||
if (match) {
|
||||
var highlight = document.createElement(nodeName || 'span');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue