[ExDoc] Proposal: Anchor built-in types

46 views
Skip to first unread message

Wojtek Mach

unread,
Oct 26, 2016, 11:12:40 AM10/26/16
to elixir-lang-core
Hello,
I think it would be useful to add anchors to built-in types and the main benefit would be improving "discoverability" of the typespecs page.
It might also make sense to anchor basic types later on.

Please let me know if this sounds like a good idea, and I'd be happy to provide PRs.

Wojtek

José Valim

unread,
Oct 26, 2016, 11:22:56 AM10/26/16
to elixir-l...@googlegroups.com
I think it would be nice but I am not sure how the links would work. Thoughts?



José Valim
Skype: jv.ptec
Founder and Director of R&D

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/cceb6883-3dfc-479a-bb85-bc6ecae1bb56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wojtek Mach

unread,
Oct 26, 2016, 11:40:34 AM10/26/16
to elixir-lang-core, jose....@plataformatec.com.br
In `Typespecs.md` I changed the row to be:

[`timeout()`](#t:timeout/0) <a name="#t:timeout/0"></a> | `:infinity` \| `non_neg_integer()`

and used it to generate the shown html. The <a name=""> piece is obviously pretty hacky, but I couldn't find a standard markdown way of inserting anchors. As far as ex_doc changes, I imagine it would be similar to how we link String.t, and/or keep a whitelist of built-in types; not exactly sure yet.

W dniu środa, 26 października 2016 17:22:56 UTC+2 użytkownik José Valim napisał:
I think it would be nice but I am not sure how the links would work. Thoughts?



José Valim
Skype: jv.ptec
Founder and Director of R&D

On Wed, Oct 26, 2016 at 5:12 PM, Wojtek Mach <woj...@wojtekmach.pl> wrote:
Hello,
I think it would be useful to add anchors to built-in types and the main benefit would be improving "discoverability" of the typespecs page.
It might also make sense to anchor basic types later on.

Please let me know if this sounds like a good idea, and I'd be happy to provide PRs.

Wojtek

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.

José Valim

unread,
Oct 26, 2016, 11:51:19 AM10/26/16
to elixir-l...@googlegroups.com
Yeah, I guess that's the first part to figure out then. I am not sure how acceptable <a name="..."> is going to be in Elixir's repo.



José Valim
Skype: jv.ptec
Founder and Director of R&D

To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/bfb01971-a463-498f-a197-b6b6ff82d44f%40googlegroups.com.

Wojtek Mach

unread,
Oct 26, 2016, 11:57:30 AM10/26/16
to elixir-l...@googlegroups.com
I figured the <a name=""> thing would limited to just Typespecs.md so perhaps an exception could be made (famous last words) but I agree it's suboptimal. I'll update this thread if I find a cleaner solution. Thanks for considering it!


For more options, visit https://groups.google.com/d/optout.



--
Wojtek Mach
Reply all
Reply to author
Forward
0 new messages