As seen in https://github.com/angular/angular.js/commit/43a2f3d0bf435e3626cd679caff4281cfb3415bd , a better way to fix this is to use `[\s\S]+` to include both whitespace and non-whitespace character classes.