Commit 6ff624ed authored by nanahira's avatar nanahira

fix rc shortcut again

parent 0a5ef0c1
......@@ -21,7 +21,10 @@ export class CompatModule extends BaseModule {
const matching = expr.match(rcRegexp);
return session.execute({
name: 'rc',
args: [matching[2]?.trim() || '检定', matching[1]],
args: [
matching[1],
...(matching[2] ? [parseInt(matching[2].trim())] : []),
],
});
}
return next();
......
export const rollRegexp = /^((\d*)d)?(\d+)(\+((\d*)d)?(\d+))*$/i;
export const rcRegexp = /^[ac](\d{1,3})( +[^ ].*)?$/i;
export const rcRegexp = /^[ac]([^ ]+)( +\d{1,3})?$/i;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment