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

657 properly set link in types with parameter #694

Conversation

ymtszw
Copy link
Contributor

@ymtszw ymtszw commented Mar 25, 2017

Should fix #657

@sourcelevel-bot
Copy link

Hello, @ymtszw! This is your first Pull Request that will be reviewed by Ebert, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.

@sourcelevel-bot
Copy link

Ebert has finished reviewing this Pull Request and has found:

  • 2 possible new issues (including those that may have been commented here).

You can see more details about this review at https://ebertapp.io/github/elixir-lang/ex_doc/pulls/694.

@@ -179,6 +181,13 @@ defmodule ExDoc.Formatter.HTML.Autolink do
end
defp strip_parens(string, _), do: string

defp split_string_to_link(string) do
case :binary.match(string, "(") do
Copy link
Member

Choose a reason for hiding this comment

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

Use :binary.split and then you don't need to use match+String.split_at. :)

Choose a reason for hiding this comment

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

0c851c6 here it is.
I thought it should be OK here to exact-match against 2- or 1-element lists, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

^ sorry, alt account

@josevalim
Copy link
Member

I have added one tiny comment and this is good to go! Thank you!

@josevalim josevalim merged commit d294125 into elixir-lang:master Mar 25, 2017
@josevalim
Copy link
Member

❤️ 💚 💙 💛 💜

@ymtszw ymtszw deleted the 657_properly_set_link_in_types_with_parameter branch March 25, 2017 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Parameterized type in function spec generates an extra anchor tag
3 participants