Unnecessarily escaped forward-slash in regex produces invalid JS

Description

When compiling an escaped forward slash in a regex literal (muscle memory from Javascript syntax), ClojureScript will emit invalid Javascript, ie. it will emit an escaped back slash instead, and a terminating forward slash.

In bare node repl:

generates the invalid expression:

Interestingly both this and the unescaped variation (#"/") work correctly in Planck (and regular Clojure).

Creating the regex manually throws a reader error, because the string literal is illegal:

Unsure of whether a reader error or "we know what you meant" behaviour is preferable.

Environment

None

Status

Assignee

Unassigned

Reporter

Jeff Palentine

Labels

None

Approval

None

Patch

None

Priority

Minor
Configure