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

Make autolinking configurable #188

Merged
merged 4 commits into from
Jul 1, 2020
Merged

Make autolinking configurable #188

merged 4 commits into from
Jul 1, 2020

Conversation

Tar-Minyatur
Copy link
Contributor

Feature request #187

  • Configuration use_autolinks added
  • When set to false, the short link syntax <url> will not be used

Copy link
Member

@colinodell colinodell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I think this approach looks great! If could you please update the tests we can go ahead and get this merged :)

$result = $markdown('<a href="https://www.google.com">Google</a>');
$this->assertEquals('[Google](https://www.google.com)', $result);
$result = $markdown('<a href="google.com">google.com</a>');
$this->assertEquals('[google.com](google.com)', $result);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind changing this to use the $this->html_give_markdown() helper method instead for consistency?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! I totally missed the fact that this method also accepts options. There are so few test cases using it that at a first glance I missed that completely.

Copy link
Member

@colinodell colinodell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks for the contribution 👍

@colinodell colinodell linked an issue Jul 1, 2020 that may be closed by this pull request
@colinodell colinodell merged commit 2742fe3 into thephpleague:master Jul 1, 2020
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

Successfully merging this pull request may close these issues.

Force link style option
2 participants