@@ -12,7 +12,7 @@ Current version indicated by LITEVER below.
1212-->
1313
1414<script id="init-config">
15- const LITEVER = 293 ;
15+ const LITEVER = 294 ;
1616 const urlParams = new URLSearchParams(window.location.search);
1717 var localflag = urlParams.get('local'); //this will be replaced automatically in embedded kcpp
1818 const STORAGE_PREFIX = (localflag?"e_":"")+"kaihordewebui_";
@@ -4426,8 +4426,9 @@ Current version indicated by LITEVER below.
44264426 // Find the next delimiter occurrence at or after i
44274427 let nextIndex = -1;
44284428 let nextDelimiter = null;
4429- for (const d of delimiters) {
4430- const idx = text.indexOf(d, i);
4429+ for (let j = 0; j < delimiters.length; j++) {
4430+ let d = delimiters[j];
4431+ let idx = text.indexOf(d, i);
44314432 if (idx !== -1 && (nextIndex === -1 || idx < nextIndex)) {
44324433 nextIndex = idx;
44334434 nextDelimiter = d;
@@ -4448,8 +4449,9 @@ Current version indicated by LITEVER below.
44484449
44494450 // Now find the next delimiter after this one to mark end of this segment
44504451 let nextAfter = -1;
4451- for (const d of delimiters) {
4452- const idx = text.indexOf(d, nextIndex + nextDelimiter.length);
4452+ for (var j = 0; j < delimiters.length; j++) {
4453+ var d = delimiters[j];
4454+ var idx = text.indexOf(d, nextIndex + nextDelimiter.length);
44534455 if (idx !== -1 && (nextAfter === -1 || idx < nextAfter)) {
44544456 nextAfter = idx;
44554457 }
@@ -6857,7 +6859,7 @@ Current version indicated by LITEVER below.
68576859 .replace(/~~(\w.*?)~~/gm, "<del>$1</del>")
68586860 .replace(/\^\^(\w.*?)\^\^/gm, "<ins>$1</ins>")
68596861 .replace(/\{\{(\w.*?)\}\}/gm, "<mark>$1</mark>")
6860- .replace(/^((?:\|[^|\r\n]* [^|\r\n\s]\s*)+ \| {0,2}(?:\r?\n|\r|))+/gm,
6862+ .replace(/^((?:(?: \|[^|\r\n]+)*\| [^|\r\n]*[^\s|\r\n][^|\r\n]*(?:\|[^|\r\n]+)* \| {0,2}(?:\r?\n|\r|$ ))+) /gm,
68616863 (matchedTable) => convertMarkdownTableToHtml(matchedTable));
68626864 //.replace(/ \n/g, "\n<br/>"); //this is the reddit behavior where spacespacenewline generates extra newline
68636865
0 commit comments