From 176b0111fe7fa1022bc37d773276be3605c50fd8 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Sat, 14 Nov 2009 14:08:09 +0100 Subject: [PATCH] ctemplate / mustache compat: partials now use >, not < --- examples/template_partial.html | 2 +- examples/view_partial.html | 2 +- mustache.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/template_partial.html b/examples/template_partial.html index b5ecbb8..6a09372 100644 --- a/examples/template_partial.html +++ b/examples/template_partial.html @@ -1,2 +1,2 @@

{{title}}

-{{partial}} \ No newline at end of file diff --git a/examples/view_partial.html b/examples/view_partial.html index d7c6b49..8f0c08d 100644 --- a/examples/view_partial.html +++ b/examples/view_partial.html @@ -1,3 +1,3 @@

{{greeting}}

-{{partial}}

{{farewell}}

\ No newline at end of file diff --git a/mustache.js b/mustache.js index 06afe86..c01f0eb 100644 --- a/mustache.js +++ b/mustache.js @@ -73,7 +73,7 @@ var Mustache = function() { var lines = template.split("\n"); var new_regex = function() { - return new RegExp(that.otag + "(=|!|<|\\{)?([^\/#]+?)\\1?" + + return new RegExp(that.otag + "(=|!|>|\\{)?([^\/#]+?)\\1?" + that.ctag + "+", "g"); }; @@ -93,7 +93,7 @@ var Mustache = function() { // on the same line i--; return ""; - case "<": // render partial + case ">": // render partial return that.render_partial(name, context, partials); case "{": // the triple mustache is unescaped return that.find(name, context);