Commit 586ef2ac by Jordi Boggiano

Fix regex delimiter

parent 553f3678
...@@ -29,20 +29,20 @@ class Dwoo_Plugin_extends extends Dwoo_Plugin implements Dwoo_ICompilable ...@@ -29,20 +29,20 @@ class Dwoo_Plugin_extends extends Dwoo_Plugin implements Dwoo_ICompilable
list($l, $r) = $compiler->getDelimiters(); list($l, $r) = $compiler->getDelimiters();
self::$l = preg_quote($l,'/'); self::$l = preg_quote($l,'/');
self::$r = preg_quote($r,'/'); self::$r = preg_quote($r,'/');
self::$regex = '% self::$regex = '/
'.self::$l.'block\s(["\']?)(.+?)\1'.self::$r.'(?:\r?\n?) '.self::$l.'block\s(["\']?)(.+?)\1'.self::$r.'(?:\r?\n?)
((?: ((?:
(?R) (?R)
| |
[^'.self::$l.']* [^'.self::$l.']*
(?: (?:
(?! '.self::$l.'/?block\b ) (?! '.self::$l.'\/?block\b )
'.self::$l.' '.self::$l.'
[^'.self::$l.']*+ [^'.self::$l.']*+
)* )*
)*) )*)
'.self::$l.'\/block'.self::$r.' '.self::$l.'\/block'.self::$r.'
%six'; /six';
if ($compiler->getLooseOpeningHandling()) { if ($compiler->getLooseOpeningHandling()) {
self::$l .= '\s*'; self::$l .= '\s*';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment