mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
empty regular expressions with flags still need to be compiled to /(?:)/
This commit is contained in:
@@ -55,3 +55,9 @@ test "an empty heregex will compile to an empty, non-capturing group", ->
|
||||
|
||||
test "#1724: regular expressions beginning with `*`", ->
|
||||
throws -> CoffeeScript.compile '/// * ///'
|
||||
|
||||
test "empty regular expressions with flags", ->
|
||||
fn = (x) -> x
|
||||
a = "" + //i
|
||||
fn ""
|
||||
eq '/(?:)/i', a
|
||||
|
||||
Reference in New Issue
Block a user