ex_doc v0.19.1 ExDoc.Formatter.HTML.Autolink View Source

Conveniences for autolinking.

Link to this section Summary

Functions

Autolinks all modules nodes

Compiles information used during autolinks

Helper function for autolinking erlang functions

Autolinks any documentation in the project

Link to this section Functions

Autolinks all modules nodes.

This is the main API to autolink any modules nodes.

Link to this function compile(modules, extension, extra_lib_dirs) View Source

Compiles information used during autolinks.

Link to this function elixir_functions(bin, project_funs, extension \\ ".html", lib_dirs \\ elixir_lib_dirs()) View Source

Helper function for autolinking elixir functions.

Project functions are specified in project_funs as a list of Module.fun/arity tuples.

Functions wrapped in markdown url syntax can link to other docs if the url is wrapped in backticks, otherwise the url is used as is. If the function doesn’t touch the leading or trailing ], e.g. [my link Module.link/1 is here](url), the Module.fun/arity will get translated to the new href of the function.

Link to this function elixir_modules(bin, modules, module_id \\ nil, extension \\ ".html", lib_dirs \\ elixir_lib_dirs()) View Source

Helper function for autolinking elixir modules.

Ignores modules which are already wrapped in markdown url syntax, e.g. [Module](url). If the module name doesn’t touch the leading or trailing ], e.g. [my link Module is here](url), the Module will get translated to the new href of the module.

Helper function for autolinking erlang functions.

Only links modules that are in the Erlang distribution lib_dir and only link functions in those modules that export a function of the same name and arity.

Ignores functions which are already wrapped in markdown url syntax, e.g. [:module.test/1](url). If the function doesn’t touch the leading or trailing ], e.g. [my link :module.link/1 is here](url), the :module.fun/arity will get translated to the new href of the function.

Link to this function locals(bin, locals, aliases \\ [], extension \\ ".html", lib_dirs \\ elixir_lib_dirs()) View Source

Helper function for autolinking locals.

Create links to locally defined functions, specified in locals as a list of fun/arity strings.

Ignores functions which are already wrapped in markdown url syntax, e.g. [test/1](url). If the function doesn’t touch the leading or trailing ], e.g. [my link link/1 is here](url), the fun/arity will get translated to the new href of the function.

Link to this function project_doc(bin, compiled) View Source

Autolinks any documentation in the project.

This is the main API to autolink any project documentation.

Link to this function typespec(ast, typespecs, aliases \\ [], lib_dirs \\ elixir_lib_dirs() ++ erlang_lib_dirs()) View Source

Helper function for autolinking typespecs.

It converts the given ast to string while linking the locals given by typespecs as HTML.