mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fix unclosed block comment infinite loop
This commit is contained in:
@ -797,7 +797,12 @@ export class SlashCommandParser {
|
||||
return this.testSymbol(/\/\*/);
|
||||
}
|
||||
testBlockCommentEnd() {
|
||||
return this.testSymbol(/\*\|/);
|
||||
if (!this.verifyCommandNames) {
|
||||
if (this.index >= this.text.length) return true;
|
||||
} else {
|
||||
if (this.ahead.length < 1) throw new SlashCommandParserError(`Unclosed block comment at position ${this.userIndex}`, this.text, this.index);
|
||||
}
|
||||
return this.testSymbol('*|');
|
||||
}
|
||||
parseBlockComment() {
|
||||
const start = this.index + 1;
|
||||
|
Reference in New Issue
Block a user