mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fix for escaping first character of value
This commit is contained in:
@ -460,7 +460,7 @@ export class SlashCommandParser {
|
|||||||
}
|
}
|
||||||
parseUnnamedArgument() {
|
parseUnnamedArgument() {
|
||||||
/**@type {SlashCommandClosure|String}*/
|
/**@type {SlashCommandClosure|String}*/
|
||||||
let value = '';
|
let value = this.take(); // take the first, already tested, char
|
||||||
let isList = false;
|
let isList = false;
|
||||||
let listValues = [];
|
let listValues = [];
|
||||||
while (!this.testUnnamedArgumentEnd()) {
|
while (!this.testUnnamedArgumentEnd()) {
|
||||||
@ -512,7 +512,7 @@ export class SlashCommandParser {
|
|||||||
return this.testSymbol(']');
|
return this.testSymbol(']');
|
||||||
}
|
}
|
||||||
parseListValue() {
|
parseListValue() {
|
||||||
let value = '';
|
let value = this.take(); // take the already tested opening bracket
|
||||||
while (!this.testListValueEnd()) value += this.take(); // take all chars until closing bracket
|
while (!this.testListValueEnd()) value += this.take(); // take all chars until closing bracket
|
||||||
value += this.take(); // take closing bracket
|
value += this.take(); // take closing bracket
|
||||||
return value;
|
return value;
|
||||||
@ -526,7 +526,7 @@ export class SlashCommandParser {
|
|||||||
return this.testCommandEnd();
|
return this.testCommandEnd();
|
||||||
}
|
}
|
||||||
parseValue() {
|
parseValue() {
|
||||||
let value = '';
|
let value = this.take(); // take the first, already tested, char
|
||||||
while (!this.testValueEnd()) value += this.take(); // take all chars until value end
|
while (!this.testValueEnd()) value += this.take(); // take all chars until value end
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user