mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-24 14:07:03 +01:00
Modified the wrong html for code highlight, ended up highlighting the whole list at the same time, whoops
This commit is contained in:
parent
6dba85ff65
commit
cb10c35ec9
@ -788,8 +788,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function render_code_highlighting(element) {
|
function render_code_highlighting(element) {
|
||||||
element.each(function(i, block) {
|
for (var i = 0; i < element.length; i++) {
|
||||||
var elem = $(block);
|
var elem = $(element[i]);
|
||||||
var codetext = elem.text();
|
var codetext = elem.text();
|
||||||
var splitted = codetext.split("\n");
|
var splitted = codetext.split("\n");
|
||||||
if (splitted.length > 1) {
|
if (splitted.length > 1) {
|
||||||
@ -802,12 +802,12 @@
|
|||||||
splitted.splice(0, 1); // delete first line
|
splitted.splice(0, 1); // delete first line
|
||||||
var restOfCode = splitted.join("\n");
|
var restOfCode = splitted.join("\n");
|
||||||
var highlighted = hljs.highlight(language, restOfCode, true);
|
var highlighted = hljs.highlight(language, restOfCode, true);
|
||||||
element.html(highlighted.value);
|
elem.html(highlighted.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function fill_discord_messages(messages, jumpscroll, replace=null) {
|
function fill_discord_messages(messages, jumpscroll, replace=null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user