Open TannerRogalsky opened 10 years ago
Hey Paul! I found a small bug in the pattern translation code. I think that the first ROSETTA_STONE entry is matching hyphens when it shouldn't be and turning a pattern like ^(%d+)-(%d+)$ into ^(\d+)*?(\d+)$.
ROSETTA_STONE
^(%d+)-(%d+)$
^(\d+)*?(\d+)$
https://github.com/gamesys/moonshine/blob/adff2ed4f2a15bea502633ac29f0c362593bd7c8/vm/src/lib.js#L42
Cheers, Tanner. The regex translation is a tricky part of the VM. I'll take a look.
Haha, as regexes can sometimes be.
Hey Paul! I found a small bug in the pattern translation code. I think that the first
ROSETTA_STONE
entry is matching hyphens when it shouldn't be and turning a pattern like^(%d+)-(%d+)$
into^(\d+)*?(\d+)$
.https://github.com/gamesys/moonshine/blob/adff2ed4f2a15bea502633ac29f0c362593bd7c8/vm/src/lib.js#L42