Skip to content

Commit

Permalink
Merge .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
richthegeek committed Apr 28, 2014
2 parents f87a3c3 + 35da9ef commit 47537f4
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ vendor
composer.lock
/.project
/.settings
/nbproject/
/nbproject
4 changes: 4 additions & 0 deletions tests/directive-in-mixin.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@font-face {
font-family: 'first-fontname'; }
@font-face {
font-family: 'second-fontname'; }
7 changes: 7 additions & 0 deletions tests/directive-in-mixin.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@mixin webfont($fontname){
@font-face{
font-family: $fontname;
}
}
@include webfont('first-fontname');
@include webfont('second-fontname');
16 changes: 13 additions & 3 deletions tree/SassDirectiveNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ protected function getDirective()
*/
public function parse($context)
{
$this->token->source = self::interpolate_nonstrict($this->token->source, $context);
$node = clone $this;
$node->token->source = self::interpolate_nonstrict($this->token->source, $context);

$this->children = $this->parseChildren($context);
$node->children = $this->parseChildren($context);

return array($this);
return array($node);
}

/**
Expand All @@ -65,6 +66,15 @@ public function render()
return $this->renderer->renderDirective($this, $properties);
}

/**
* @see parse
*/
public function __clone()
{
parent::__clone();
$this->token = clone $this->token;
}

/**
* Returns a value indicating if the token represents this type of node.
* @param object $token token
Expand Down

0 comments on commit 47537f4

Please sign in to comment.