lordnull / dice.js

Generic RPG dice string parser and roller
MIT License
30 stars 3 forks source link

Fixed d# and w# not interpreting as being 1d#/1w# #8

Closed Bcpoole closed 9 years ago

Bcpoole commented 9 years ago

Using Regex replace before parsing, corrected d# and w# not interpreting a prefix of 1, and also handles D# and W#.

lordnull commented 9 years ago

I appreciate the work, but I think the fix in 4dbbd405c0654348c926ba7710bb9f7c444da3c3 is better as it fixes the underlying error in the parser. I've added a test as well, so we'll know if I ever screw this up again :).