elixir-plug / plug

Compose web applications with functions
https://hex.pm/packages/plug
Other
2.84k stars 582 forks source link

Do not show docs link for defimpl #1094

Closed moogle19 closed 2 years ago

moogle19 commented 2 years ago

The docs links for protocol implementations don't work, because of the combined module names, e.g Phoenix.HTML.Safe.Phoenix.LiveView.Rendered.to_iodata/1 which links to the nonexistent https://hexdocs.pm/phoenix_live_view/0.17.9/Phoenix.HTML.Safe.Phoenix.LiveView.Rendered.html#to_iodata/1.

I added a check, for the __impl__/1 function and if the module contains the function, it shouldn't show the docs link.

josevalim commented 2 years ago

@moogle19 can you please try this fix I pushed? I think we can only show the docs when there is something explicitly documented.

moogle19 commented 2 years ago

@josevalim Yes, that works! I though there was some reason, why only :hidden was checked in the matcher.

But that solution looks better.

josevalim commented 2 years ago

:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart: