STDLIB

Reference Manual

Version 3.13

Table of Contents

shell_docs

Module

shell_docs

Module Summary

Functions used to render documentation for a shell.

Since

Module shell_docs was introduced in OTP 23.0.

Description

This module can be used to render function and type documentation to be printed in a shell. It can only render documentation of the format application/erlang+html. For more information about this format see Documentation Storage in Erl_Docgen's User's Guide.

Data Types

docs_v1() = #docs_v1{}
chunk_element_type() =
    a | p | 'div' | i | br | em | pre | code | ul | ol | li | dl |
    dt | dd

The HTML tags allowed in application/erlang+html.

Exports

render(Module :: module(), Docs :: docs_v1()) ->
          unicode:chardata()
OTP 23.0

Render the documentation for a module.

render(Module :: module(),
       Function :: function(),
       Docs :: docs_v1()) ->
          unicode:chardata() | {error, function_missing}
OTP 23.0
render(Module :: module(),
       Function :: function(),
       Arity :: arity(),
       Docs :: docs_v1()) ->
          unicode:chardata() | {error, function_missing}
OTP 23.0

Render the documentation for a function.

render_type(Module :: module(), Docs :: docs_v1()) ->
               unicode:chardata()
OTP 23.0

Render a list of all available types in a module.

render_type(Module :: module(), Type :: atom(), Docs :: docs_v1()) ->
               unicode:chardata() | {error, type_missing}
OTP 23.0
render_type(Module :: module(),
            Type :: atom(),
            Arity :: arity(),
            Docs :: docs_v1()) ->
               unicode:chardata() | {error, type_missing}
OTP 23.0

Render the documentation of a type in a module.

validate(Module) -> ok
OTP 23.0

Types

Module = module() | docs_v1()

This function can be used to do a basic validation of the doc content of application/erlang+html format.

normalize(Docs) -> NormalizedDocs
OTP 23.0

Types

Docs = NormalizedDocs = chunk_elements()

This function can be used to do whitespace normalization of application/erlang+html documentation.