Skip to content

Link to functions with custom text #622

@eksperimental

Description

@eksperimental

I'm going thoroughly through the Elixir documentation, and I have come across quiet a common pattern, which is wanting to link to a function/callback without showing the full Module.function/arity thing. (most of the time trying to hide the module)... in this case because it's either Kernel or Kernel.SpecialForms and we don't need to distract the user with this information.

A good example is the Guards page.

the following “type-check” functions (all documented in the Kernel module):

  • is_atom/1
  • is_binary/1
  • is_bitstring/1
  • is_boolean/1

you want to link to Kernel.is_atom/1, but you don't want to show Kernel.

My proposal is to support:

[custom](`Module.functions_name/arity`)

and

[`function_name/arity`](`Module.functions_name/arity`)

and/or (not so sure about this last one)

`[function_name/arity](Module.functions_name/arity)`

what do you guys think?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions