From 9d6bd1f9e4a5225f93c241eb9b695181de5574ea Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Fri, 10 Oct 2008 16:52:02 +0000 Subject: [PATCH] Change /foo*/ to /foo*(?:)/ for vims sake --- content/template.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/template.js b/content/template.js index dce43378..ccc081a6 100644 --- a/content/template.js +++ b/content/template.js @@ -51,8 +51,10 @@ liberator.template = { case "boolean": return {arg}; case "function": + // Vim generally doesn't like /foo*/, because */ looks like a comment terminator. + // Using /foo*(:?)/ instead. if (processStrings) - return {String(arg).replace(/\{(.|\n)*/, "{ ... }")}; /* } vim */ + return {String(arg).replace(/\{(.|\n)*(?:)/, "{ ... }")}; return <>{arg}; case "undefined": return {arg};