Auto-complete code blocks during streaming

This commit is contained in:
Cohee
2023-10-20 23:52:23 +03:00
parent e4cb916dff
commit 7f8df9533b
2 changed files with 4 additions and 3 deletions

View File

@ -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++;
}
}