Skip to content

Commit

Permalink
Merge pull request SillyTavern#4 from SillyTavern/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
PasserDreamer authored May 20, 2024
2 parents b6cb081 + df2710b commit b4dc66f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion public/scripts/world-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class WorldInfoBuffer {
result += '\n' + this.#recurseBuffer.join('\n');
}

return this.#transformString(result, entry);
return result;
}

/**
Expand All @@ -204,6 +204,7 @@ class WorldInfoBuffer {
}

// Otherwise we do normal matching of plaintext with the chosen entry settings
haystack = this.#transformString(haystack, entry);
const transformedString = this.#transformString(needle, entry);
const matchWholeWords = entry.matchWholeWords ?? world_info_match_whole_words;

Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/content-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,8 @@ async function downloadGenericPng(url) {
*/
function parseRisuUrl(url) {
// 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);
return match ? match[1] : null;
}
Expand Down

0 comments on commit b4dc66f

Please sign in to comment.