shell_docs(3erl) | Erlang Module Definition | shell_docs(3erl) |
shell_docs - Functions used to render EEP-48 style documentation for a shell.
This module can be used to render function and type documentation to be printed in a shell. It can only render EEP-48 documentation of the format application/erlang+html. For more information about this format see Documentation Storage in Erl_Docgen's User's Guide.
docs_v1() = #docs_v1{}
The record holding EEP-48 documentation for a module. You can use code:get_doc/1 to fetch this information from a module.
config() =
#{encoding => unicode | latin1,
columns => integer() >= 1,
ansi => boolean()}
The configuration of how the documentation should be rendered.
chunk_element_block_type() =
p | 'div' | br | pre | ul | ol | li | dl | dt | dd | h1 | h2 |
h3
chunk_element_inline_type() = a | code | em | i
chunk_element_type() =
chunk_element_inline_type() | chunk_element_block_type()
The HTML tags allowed in application/erlang+html.
chunk_element_attr() = {atom(), unicode:chardata()}
chunk_element_attrs() = [chunk_element_attr()]
chunk_element() =
{chunk_element_type(),
chunk_element_attrs(),
chunk_elements()} |
binary()
chunk_elements() = [chunk_element()]
render(Module, Docs) -> unicode:chardata()
render(Module, Docs, Config) -> unicode:chardata()
render(Module, Function, Docs) -> Res
render(Module, Function, Docs, Config) -> Res
render(Module, Function, Arity, Docs) -> Res
render(Module, Function, Arity, Docs, Config) -> Res
Types:
Render the documentation for a module or function.
render_type(Module, Docs) -> unicode:chardata()
render_type(Module, Docs, Config) -> unicode:chardata()
render_type(Module, Type, Docs) -> Res
render_type(Module, Type, Docs, Config) -> Res
render_type(Module, Type, Arity, Docs) -> Res
render_type(Module, Type, Arity, Docs, Config) -> Res
Types:
Render the documentation of a type in a module.
render_callback(Module, Docs) -> unicode:chardata()
render_callback(Module, Docs, Config) -> unicode:chardata()
render_callback(Module, Callback, Docs) -> Res
render_callback(Module, Callback, Docs, Config) -> Res
render_callback(Module, Callback, Arity, Docs) -> Res
render_callback(Module, Callback, Arity, Docs, Config) -> Res
Types:
Render the documentation of a callback in a module.
validate(Module) -> ok
Types:
This function can be used to do a basic validation of the doc content of application/erlang+html format.
normalize(Docs) -> NormalizedDocs
Types:
This function can be used to do whitespace normalization of application/erlang+html documentation.
stdlib 3.14 | Ericsson AB |