Merge branch 'dev' into feature/higher-order-sections
This commit is contained in:
+3
-3
@@ -279,7 +279,7 @@ class Mustache {
|
|||||||
*/
|
*/
|
||||||
protected function _prepareSectionRegEx($otag, $ctag) {
|
protected function _prepareSectionRegEx($otag, $ctag) {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'/(?:(?<=\\n)[ \\t]*)?%s(?<type>[%s])(?<tag_name>.+?)%s\\n?/s',
|
'/(?:(?<=\\n)[ \\t]*)?%s(?P<type>[%s])(?P<tag_name>.+?)%s\\n?/s',
|
||||||
preg_quote($otag, '/'),
|
preg_quote($otag, '/'),
|
||||||
self::SECTION_TYPES,
|
self::SECTION_TYPES,
|
||||||
preg_quote($ctag, '/')
|
preg_quote($ctag, '/')
|
||||||
@@ -359,7 +359,7 @@ class Mustache {
|
|||||||
*/
|
*/
|
||||||
protected function _preparePragmaRegEx($otag, $ctag) {
|
protected function _preparePragmaRegEx($otag, $ctag) {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'/%s%%\\s*(?<pragma_name>[\\w_-]+)(?<options_string>(?: [\\w]+=[\\w]+)*)\\s*%s\\n?/s',
|
'/%s%%\\s*(?P<pragma_name>[\\w_-]+)(?P<options_string>(?: [\\w]+=[\\w]+)*)\\s*%s\\n?/s',
|
||||||
preg_quote($otag, '/'),
|
preg_quote($otag, '/'),
|
||||||
preg_quote($ctag, '/')
|
preg_quote($ctag, '/')
|
||||||
);
|
);
|
||||||
@@ -472,7 +472,7 @@ class Mustache {
|
|||||||
*/
|
*/
|
||||||
protected function _prepareTagRegEx($otag, $ctag) {
|
protected function _prepareTagRegEx($otag, $ctag) {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'/(?<whitespace>(?<=\\n)[ \\t]*)?%s(?<type>[%s]?)(?<tag_name>.+?)(?:\\2|})?%s(?:\\s*(?=\\n))?/s',
|
'/(?P<whitespace>(?<=\\n)[ \\t]*)?%s(?P<type>[%s]?)(?P<tag_name>.+?)(?:\\2|})?%s(?:\\s*(?=\\n))?/s',
|
||||||
preg_quote($otag, '/'),
|
preg_quote($otag, '/'),
|
||||||
self::TAG_TYPES,
|
self::TAG_TYPES,
|
||||||
preg_quote($ctag, '/')
|
preg_quote($ctag, '/')
|
||||||
|
|||||||
+1
-1
@@ -81,7 +81,7 @@ And render it:
|
|||||||
Known Issues
|
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.
|
"unclosed section" exception.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user