mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
don't need regex symbol here
This commit is contained in:
@ -794,7 +794,7 @@ export class SlashCommandParser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
testBlockComment() {
|
testBlockComment() {
|
||||||
return this.testSymbol(/\/\*/);
|
return this.testSymbol('/*');
|
||||||
}
|
}
|
||||||
testBlockCommentEnd() {
|
testBlockCommentEnd() {
|
||||||
if (!this.verifyCommandNames) {
|
if (!this.verifyCommandNames) {
|
||||||
@ -826,7 +826,12 @@ export class SlashCommandParser {
|
|||||||
return this.testSymbol(/\/[/#]/);
|
return this.testSymbol(/\/[/#]/);
|
||||||
}
|
}
|
||||||
testCommentEnd() {
|
testCommentEnd() {
|
||||||
return this.testCommandEnd();
|
if (!this.verifyCommandNames) {
|
||||||
|
if (this.index >= this.text.length) return true;
|
||||||
|
} else {
|
||||||
|
if (this.endOfText) throw new SlashCommandParserError(`Unclosed comment at position ${this.userIndex}`, this.text, this.index);
|
||||||
|
}
|
||||||
|
return this.testSymbol('|');
|
||||||
}
|
}
|
||||||
parseComment() {
|
parseComment() {
|
||||||
const start = this.index + 1;
|
const start = this.index + 1;
|
||||||
|
Reference in New Issue
Block a user