php-markdown
php-markdown copied to clipboard
runSpanGamut() performed twice on URL text in _doAnchors_inline_callback() function
Is there a reason why runSpanGamut() is called twice on the same string in the _doAnchors_inline_callback() function?
Check out the _doAnchors_inline_callback() function in Markdown.php.
$link_text = $this->runSpanGamut($matches[2]);
$link_text = $this->runSpanGamut($link_text);
As far as I see the $link_text isn't used anywhere between these two lines. I can't find any reason for this. Maybe I'm missing something?
That indeed serves no purpose, but should be harmless.
And it turns out you're not the first to comment on that. I should have fixed it then.
Feel free to submit a pull request if you want.
Thanks for clarifying. I just wanted to be sure to don't miss anything. I extended the spanGamuts and just wondered, why I had unexpected results.