From 13496cfb3ae4d4b083680db99be5b09829988dea Mon Sep 17 00:00:00 2001 From: LenAnderson Date: Sun, 23 Jun 2024 14:26:57 -0400 Subject: [PATCH] trim start of first and end of lat value part in unsplit unnamed arg (analog to pure text arg) --- public/scripts/slash-commands/SlashCommandParser.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/scripts/slash-commands/SlashCommandParser.js b/public/scripts/slash-commands/SlashCommandParser.js index e76a6598a..fd780a716 100644 --- a/public/scripts/slash-commands/SlashCommandParser.js +++ b/public/scripts/slash-commands/SlashCommandParser.js @@ -904,6 +904,14 @@ export class SlashCommandParser { listValues.push(assignment); } if (isList) { + const firstVal = listValues[0]; + if (typeof firstVal.value == 'string') { + firstVal.value = firstVal.value.trimStart(); + } + const lastVal = listValues.slice(-1)[0]; + if (typeof lastVal.value == 'string') { + lastVal.value = lastVal.value.trimEnd(); + } return listValues; } this.indexMacros(this.index - value.length, value);