Fix bug in parser.ts for handling nested blocks
This commit is contained in:
@@ -1185,7 +1185,9 @@ export function risuChatParser(da:string, arg:{
|
||||
const array = blockType.type2.substring(0, subind).split('§')
|
||||
let added = ''
|
||||
for(let i = 0;i < array.length;i++){
|
||||
added += matchResult.replaceAll(`{{slot::${sub}}}`, array[i])
|
||||
if(added){
|
||||
added += matchResult.replaceAll(`{{slot::${sub}}}`, array[i]) + '\n'
|
||||
}
|
||||
}
|
||||
console.log(added)
|
||||
da = da.substring(0, pointer + 1) + added.trim() + da.substring(pointer + 1)
|
||||
|
||||
Reference in New Issue
Block a user