Upgrade doT-php to fix the problems with bootstrap template. fix #171
This commit is contained in:
parent
7ae6041c29
commit
a3b29a11a1
|
@ -40,7 +40,8 @@ class doT {
|
|||
|
||||
public function template ($string, $def) {
|
||||
$me = $this;
|
||||
$func = preg_replace ("/'|\\\/", "\\$&", $string);
|
||||
|
||||
$func = $string;
|
||||
|
||||
// deps
|
||||
if (empty ($def)) {
|
||||
|
@ -49,6 +50,9 @@ class doT {
|
|||
$this->def = $def;
|
||||
$func = $this->resolveDefs ($func);
|
||||
}
|
||||
|
||||
$func = preg_replace ("/'|\\\/", "\\$&", $func);
|
||||
|
||||
// interpolate
|
||||
$func = preg_replace_callback ("/\{\{=([\s\S]+?)\}\}/", function ($m) use ($me) {
|
||||
return "' . " . $me->handleDotNotation ($m[1]) . " . '";
|
||||
|
@ -87,7 +91,6 @@ class doT {
|
|||
|
||||
$this->functionBody = $func;
|
||||
|
||||
//$this->functionCode = create_function ('$it', $func);
|
||||
return create_function ('$it', $func);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue