Skip to content

Commit 7354974

Browse files
author
José Valim
committed
Add a note on how to reference a callback
1 parent e1d5263 commit 7354974

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/elixir/pages/Writing Documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ There are a couple tips we recommend developers to follow when writing documenta
5454

5555
* Keep the first paragraph of the documentation concise and simple. Tools like ExDoc uses the first line to generate a summary.
5656

57-
* Markdown uses backticks (`` ` ``) to quote code. Elixir builds on top of that to automatically generate links when modules or function names are referenced. For this reason, always use full module names. If you have a module called `MyApp.Hello`, always reference it as `` `MyApp.Hello` `` and never only as `` `Hello` ``. Function names must be references by name and arity if they are local, as in `` `world/1` ``, or by module, name and arity if pointing to an external module: `` `MyApp.Hello.world/1` ``.
57+
* Markdown uses backticks (`` ` ``) to quote code. Elixir builds on top of that to automatically generate links when modules or function names are referenced. For this reason, always use full module names. If you have a module called `MyApp.Hello`, always reference it as `` `MyApp.Hello` `` and never as `` `Hello` ``. Function names must be referenced by name and arity if they are local, as in `` `world/1` ``, or by module, name and arity if pointing to an external module: `` `MyApp.Hello.world/1` ``. Referencing a `@callback` can be done by prepending `c:`, as in `` `c:world/1` ``.
5858

5959
* If using headings, always start from the second heading by using `##`. The first heading is reserved to the module or function name itself.
6060

0 commit comments

Comments
 (0)