mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Auto-complete code blocks during streaming
This commit is contained in:
@ -498,7 +498,7 @@ export function countOccurrences(string, character) {
|
||||
let count = 0;
|
||||
|
||||
for (let i = 0; i < string.length; i++) {
|
||||
if (string[i] === character) {
|
||||
if (string.substring(i, i + character.length) === character) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user