mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-28 01:47:42 +01:00
Allow escaped quoted args on split args too
This commit is contained in:
parent
010af89a72
commit
0dfebbbe52
@ -1053,9 +1053,9 @@ export class SlashCommandParser {
|
||||
if (split && splitCount && listValues.length >= splitCount) {
|
||||
// the split count has just been reached: stop splitting, the rest is one singular value
|
||||
split = false;
|
||||
if (this.testQuotedValue()) {
|
||||
if (this.testEscapedQuotedValue()) {
|
||||
// if the next bit is a quoted value, take the whole value
|
||||
assignment.value = this.parseQuotedValue();
|
||||
assignment.value = this.parseEscapedQuotedValue();
|
||||
assignment.end = this.index;
|
||||
listValues.push(assignment);
|
||||
listQuoted.push(true);
|
||||
@ -1072,9 +1072,9 @@ export class SlashCommandParser {
|
||||
listQuoted.push(false);
|
||||
assignment = new SlashCommandUnnamedArgumentAssignment();
|
||||
assignment.start = this.index;
|
||||
if (!split && this.testQuotedValue()) {
|
||||
if (!split && this.testEscapedQuotedValue()) {
|
||||
// if where currently not splitting and the next bit is a quoted value, take the whole value
|
||||
assignment.value = this.parseQuotedValue();
|
||||
assignment.value = this.parseEscapedQuotedValue();
|
||||
assignment.end = this.index;
|
||||
listValues.push(assignment);
|
||||
listQuoted.push(true);
|
||||
@ -1092,9 +1092,9 @@ export class SlashCommandParser {
|
||||
assignment.start = this.index;
|
||||
if (split) this.discardWhitespace();
|
||||
} else if (split) {
|
||||
if (this.testQuotedValue()) {
|
||||
if (this.testEscapedQuotedValue()) {
|
||||
assignment.start = this.index;
|
||||
assignment.value = this.parseQuotedValue();
|
||||
assignment.value = this.parseEscapedQuotedValue();
|
||||
assignment.end = this.index;
|
||||
listValues.push(assignment);
|
||||
listQuoted.push(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user