1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-05-02 13:34:06 -04:00
parent 3f0cecbf02
commit 06ade66d61
881 changed files with 676 additions and 47086 deletions

View file

@ -4,8 +4,13 @@
return;
}
Prism.plugins.KeepMarkup = true;
Prism.hooks.add('before-highlight', function (env) {
var firstWhiteSpaces = false;
if (!env.element.children.length) {
return;
}
var pos = 0;
var data = [];
var f = function (elt, baseNode) {
@ -21,11 +26,6 @@
if (child.nodeType === 1) { // element
f(child);
} else if(child.nodeType === 3) { // text
if(!firstWhiteSpaces) {
// We need to ignore the first white spaces in the code block
child.data = child.data.replace(/^(?:\r?\n|\r)/, '');
firstWhiteSpaces = true;
}
pos += child.data.length;
}
}
@ -94,4 +94,4 @@
});
}
});
}());
}());