mirror of
https://github.com/raeleus/Hashtag-DnD.git
synced 2025-07-05 21:20:27 -04:00
Allow flipping around check and try with the ability/skill first.
This commit is contained in:
parent
9e7a69087b
commit
bfd87c5f90
2 changed files with 27 additions and 1 deletions
|
@ -70,7 +70,9 @@ function getArgumentRemainder(command, index) {
|
|||
const pattern = new RegExp(argumentPattern)
|
||||
while ((match = pattern.exec(command)) != null) {
|
||||
if (counter++ == index + 1) {
|
||||
return command.substring(match.index).replace(/^"/, "").replace(/"$/, "").replaceAll(/\\"/g, '"')
|
||||
var result = command.substring(match.index)
|
||||
if (/^".*"$/g.test(result)) result = result.replace(/^"/, "").replace(/"$/, "")
|
||||
return result.replaceAll(/\\"/g, '"')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue