hm, this isn't 100% equivalent

```js
// $1 way
new Function('return "' + "a\nb".replace(/(["\r\n])/g, '\\$1') + '"')() === "ab"; // lost the new line

// function way
new Function('return "' + "a\nb".replace(/[\r\n]/g, function (lineEnding) {
  return lineEnding === '\n' ? '\\n' : '\\r';
}) + '"')() === "a\nb"
```

So the `$1 way` will remove any `\n` and `\r` from the expression that will be outputted for the warning (hence avoiding the initial error)

Is that okay? it's not that important of a _bug_ imo and can be ignored.