kzykhys / Ciconia

A New Markdown parser for PHP5.4
http://ciconia.kzykhys.com/
MIT License
355 stars 31 forks source link

Removed double call to new Text() #7

Closed lsv closed 10 years ago

lsv commented 10 years ago

Seems a bit odd to generate the same object twice

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling 6fb2c090a633493761e85006656ffb13052d2188 on lsv:patch-1 into 88e43e4ef6832927b57ebece5f909dd6fb0f5f4f on kzykhys:master.

inoryy commented 10 years ago

Proper fix:

public function render($text, array $options = array())
{
    $text = new Text($text);

    $markdown = new Markdown($this->renderer, $text, $options);

    // rest of the code untouched
}
kzykhys commented 10 years ago

Thank you for reporting