Skip to content

Commit

Permalink
Fixes #324 bootstrap v4-dev regression
Browse files Browse the repository at this point in the history
  • Loading branch information
robocoder committed Sep 12, 2015
1 parent c41ae5b commit 2977aa4
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -1270,10 +1270,7 @@ protected function compileChild($child, $out)

// push scope, apply args
$this->pushEnv();

if ($this->env->depth > 0) {
$this->env->depth--;
}
$this->env->depth--;

if (isset($content)) {
$content->scope = $callingScope;
Expand All @@ -1285,7 +1282,7 @@ protected function compileChild($child, $out)
$this->applyArguments($mixin->args, $argValues);
}

//$this->env->marker = 'mixin';
$this->env->marker = 'mixin';

foreach ($mixin->children as $child) {
$this->compileChild($child, $out);
Expand All @@ -1305,17 +1302,14 @@ protected function compileChild($child, $out)
break;
}

$strongTypes = array('include', 'block', 'for', 'while');
$this->storeEnv = $content->scope;

foreach ($content->children as $child) {
$this->storeEnv = (in_array($child[0], $strongTypes))
? null
: $content->scope;

$this->compileChild($child, $out);
}

unset($this->storeEnv);
$this->storeEnv = null;

break;

case 'debug':
Expand Down

0 comments on commit 2977aa4

Please sign in to comment.