diff --git a/index.html b/index.html
index 9885f56..cfc4a72 100644
--- a/index.html
+++ b/index.html
@@ -2922,6 +2922,16 @@
//attempt to load settings
function init() {
+ //polyfill for forEach
+ if (window.NodeList && !NodeList.prototype.forEach) {
+ NodeList.prototype.forEach = function (callback, thisArg) {
+ thisArg = thisArg || window;
+ for (var i = 0; i < this.length; i++) {
+ callback.call(thisArg, this[i], i, this);
+ }
+ };
+ }
+
//uncompress compacted scenarios
for(let i=0;i
').replaceAll('\n','
') + '
$1
`); }
- else { blocks[i] = blocks[i].replaceAll('```','`').replaceAll('``','`').replaceAll(/`(.*?)`/g, `$1
`);}
+ if (blocks[i].startsWith('```')) { blocks[i] = blocks[i].replace(/```[\s\S]*?\n([\s\S]*?)```/g, `
$1
`); }
+ else {
+ let bi = blocks[i];
+ bi = replaceAll(bi,'```','`');
+ bi = replaceAll(bi,'``','`');
+ bi = bi.replace(/`(.*?)`/g, `$1
`);
+ blocks[i] = bi;
+ }
}
return blocks.join('');
}
@@ -8446,7 +8472,10 @@
function updateTextPreview() {
let preview = `You are Mikago, a prestigious bot that's a supervillain.\n\nRoleplay in first person, be prestigious, don't be a bot. This is a fantasy world.\n\nCode blocks should be wrapped in triple backticks, like so:\nqqq\n