eevee / lexys-labyrinth

Chip's Challenge 2 emulator that runs in a browser
https://c.eev.ee/lexys-labyrinth/
Other
73 stars 12 forks source link

Avoid lookbehind assertion #1

Closed magical closed 4 years ago

magical commented 4 years ago

The game fails to load under Firefox 77.0 with the very helpful error message,

SyntaxError: invalid regexp group   format-c2m.js:1:1

Turns out that it doesn't like the (?<=^|\n) lookbehind group in the CLUE regexp. It seems lookbehind support wasn't added until FF 78, according to the big table. Switch it to a multiline regexp instead.

eevee commented 4 years ago

Had no idea that was so new; I guess I take PCRE for granted. Cheers!