Allow whitespace in pragma tags.

This commit is contained in:
Justin Hileman
2010-04-30 00:15:17 -04:00
parent a834ef7845
commit 37cf2706a9
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -199,7 +199,7 @@ class Mustache {
$otag = $this->prepareRegEx($this->otag);
$ctag = $this->prepareRegEx($this->ctag);
$regex = '/' . $otag . '%([\\w_-]+)((?: [\\w]+=[\\w]+)*)' . $ctag . '\\n?/';
$regex = '/' . $otag . '%\\s*([\\w_-]+)((?: [\\w]+=[\\w]+)*)\\s*' . $ctag . '\\n?/';
return preg_replace_callback($regex, array($this, 'renderPragma'), $template);
}