From 3aedc01de382b0a5cc388dacb1a2c2f8a2a62ac6 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Sat, 1 Mar 2014 03:17:38 +0100 Subject: [PATCH] better regex --- tasks/jst.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/jst.js b/tasks/jst.js index 605c10f..4a114a2 100644 --- a/tasks/jst.js +++ b/tasks/jst.js @@ -2,7 +2,7 @@ * grunt-contrib-jst * http://gruntjs.com/ * - * Copyright (c) 2014 Tim Branyen, contributors + * Copyright (c) 2014 Tim Branyen, contributors * Licensed under the MIT license. */ @@ -55,7 +55,7 @@ module.exports = function(grunt) { } if (options.prettify) { - compiled = compiled.replace(new RegExp('\n', 'g'), ''); + compiled = compiled.replace(/\n/g, ''); } filename = processName(filepath);