Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runSpanGamut() performed twice on URL text in _doAnchors_inline_callback() function #373

Open
paxter opened this issue May 28, 2022 · 2 comments

Comments

@paxter
Copy link

paxter commented May 28, 2022

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.

Line 754:

$link_text		=  $this->runSpanGamut($matches[2]);

Line 773:

$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?

@michelf
Copy link
Owner

michelf commented May 28, 2022

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.

@paxter
Copy link
Author

paxter commented May 28, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants