From c9f02f94c433126c4c7a27d47d3fc296403fbaa1 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Wed, 9 Aug 2023 04:39:38 +0900 Subject: [PATCH] [feat] support extended roll syntax --- src/ts/parser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ts/parser.ts b/src/ts/parser.ts index 9e41e37c..fbba6023 100644 --- a/src/ts/parser.ts +++ b/src/ts/parser.ts @@ -600,8 +600,8 @@ const matcher = (p1:string,matcherArg:matcherArg) => { } } if(p1.startsWith('roll')){ - const arr = p1.split(' ', 2) - let ina = arr[1] + const arr = p1.split(/\:|\ /g) + let ina = arr.at(-1) if(ina.startsWith('d')){ ina = ina.substring(1)