From 2fc2b8c0d0f2f8ecbd0ba326def817d6c4440a18 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 4 Nov 2010 19:22:23 -0700 Subject: [PATCH] don't make the thing a multi-line --- mustache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mustache.js b/mustache.js index 97504b1..bb9f113 100644 --- a/mustache.js +++ b/mustache.js @@ -150,7 +150,7 @@ var Mustache = function() { var that = this; var regex = new RegExp("(?:^([\\s\\S]*?))?" + this.otag + "(\\^|\\#)\\s*(.+)\\s*" + this.ctag + "\n*([\\s\\S]+?)" + this.otag + "\\/\\s*\\3\\s*" + this.ctag + "\\s*" + - "([\\s\\S]*?)(?=(?:" + this.otag + "(?:\\^|\\#)\\s*(?:.+)\\s*" + this.ctag + ")|$)", "mg"); + "([\\s\\S]*?)(?=(?:" + this.otag + "(?:\\^|\\#)\\s*(?:.+)\\s*" + this.ctag + ")|$)", "g"); // for each {{#foo}}{{/foo}} section do... return template.replace(regex, function(match, before, type, name, content, after) {