From f2d677e5d604fd5bab952a815dd33cd275e7b444 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Wed, 8 Dec 2010 16:04:11 -0500 Subject: [PATCH 1/2] Update README. --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index ac39899..3662d3c 100644 --- a/README.markdown +++ b/README.markdown @@ -81,7 +81,7 @@ And render it: Known Issues ------------ - * Sections don't respect delimiter changes -- `delimiters` example currently fails with an + * Things get weird when you change delimiters inside a section -- `delimiters` example currently fails with an "unclosed section" exception. From 7d239849dadda77dc324d15f47638d16e49985e1 Mon Sep 17 00:00:00 2001 From: Luke Morton Date: Tue, 14 Dec 2010 20:57:09 +0000 Subject: [PATCH 2/2] Fixes #25 --- Mustache.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Mustache.php b/Mustache.php index 3b43a4f..34c5e15 100644 --- a/Mustache.php +++ b/Mustache.php @@ -274,7 +274,7 @@ class Mustache { */ protected function _prepareSectionRegEx($otag, $ctag) { return sprintf( - '/(?:(?<=\\n)[ \\t]*)?%s(?[%s])(?.+?)%s\\n?/s', + '/(?:(?<=\\n)[ \\t]*)?%s(?P[%s])(?P.+?)%s\\n?/s', preg_quote($otag, '/'), self::SECTION_TYPES, preg_quote($ctag, '/') @@ -354,7 +354,7 @@ class Mustache { */ protected function _preparePragmaRegEx($otag, $ctag) { return sprintf( - '/%s%%\\s*(?[\\w_-]+)(?(?: [\\w]+=[\\w]+)*)\\s*%s\\n?/s', + '/%s%%\\s*(?P[\\w_-]+)(?P(?: [\\w]+=[\\w]+)*)\\s*%s\\n?/s', preg_quote($otag, '/'), preg_quote($ctag, '/') ); @@ -467,7 +467,7 @@ class Mustache { */ protected function _prepareTagRegEx($otag, $ctag) { return sprintf( - '/(?(?<=\\n)[ \\t]*)?%s(?[%s]?)(?.+?)(?:\\2|})?%s(?:\\s*(?=\\n))?/s', + '/(?P(?<=\\n)[ \\t]*)?%s(?P[%s]?)(?P.+?)(?:\\2|})?%s(?:\\s*(?=\\n))?/s', preg_quote($otag, '/'), self::TAG_TYPES, preg_quote($ctag, '/')