mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
@@ -186,7 +186,7 @@ class WorldInfoBuffer {
|
|||||||
result += '\n' + this.#recurseBuffer.join('\n');
|
result += '\n' + this.#recurseBuffer.join('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.#transformString(result, entry);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -204,6 +204,7 @@ class WorldInfoBuffer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise we do normal matching of plaintext with the chosen entry settings
|
// Otherwise we do normal matching of plaintext with the chosen entry settings
|
||||||
|
haystack = this.#transformString(haystack, entry);
|
||||||
const transformedString = this.#transformString(needle, entry);
|
const transformedString = this.#transformString(needle, entry);
|
||||||
const matchWholeWords = entry.matchWholeWords ?? world_info_match_whole_words;
|
const matchWholeWords = entry.matchWholeWords ?? world_info_match_whole_words;
|
||||||
|
|
||||||
|
@@ -516,7 +516,8 @@ async function downloadGenericPng(url) {
|
|||||||
*/
|
*/
|
||||||
function parseRisuUrl(url) {
|
function parseRisuUrl(url) {
|
||||||
// Example: https://realm.risuai.net/character/7adb0ed8d81855c820b3506980fb40f054ceef010ff0c4bab73730c0ebe92279
|
// Example: https://realm.risuai.net/character/7adb0ed8d81855c820b3506980fb40f054ceef010ff0c4bab73730c0ebe92279
|
||||||
const pattern = /^https?:\/\/realm\.risuai\.net\/character\/([a-f0-9]{64})$/;
|
// or https://realm.risuai.net/character/7adb0ed8-d818-55c8-20b3-506980fb40f0
|
||||||
|
const pattern = /^https?:\/\/realm\.risuai\.net\/character\/([a-f0-9-]+)\/?$/i;
|
||||||
const match = url.match(pattern);
|
const match = url.match(pattern);
|
||||||
return match ? match[1] : null;
|
return match ? match[1] : null;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user