Skip to content

Commit

Permalink
Lexer makes less noise on spaces (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
TorbenKoehn committed Jan 16, 2016
1 parent 75912da commit b7c731a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions Lexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -876,8 +876,6 @@ protected function scanIndent()
$mixed = false;
} else {

var_dump($this->_indentStyle, $this->_indentWidth, $spaces, $tabs, $mixed);

$this->throwException(
"Mixed indentation style encountered. "
."Dont mix tabs and spaces. Stick to one of both."
Expand All @@ -902,9 +900,7 @@ protected function scanIndent()
$this->_level = intval(round($this->strlen($indent) / $this->_indentWidth));

if ($this->_level > $oldLevel + 1)
$this->throwException(
"You should indent in by one level only"
);
$this->_level = $oldLevel + 1;
} else
$this->_level = 0;

Expand Down
2 changes: 1 addition & 1 deletion Test/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testRendererForwardsOptionsToLexer($option, $value)

$renderer = new Renderer(['lexerOptions' => [$option => $value]]);

$this->assertEquals($value, $renderer->getLexer()->getOption($option));
$this->assertEquals($value, $renderer->getCompiler()->getParser()->getLexer()->getOption($option));
}

public function compilerOptionProvider()
Expand Down

0 comments on commit b7c731a

Please sign in to comment.