20202021 Ericsson AB. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. shell_docs Lukas Larsson 1 2020-02-19 A shell_docs.xml
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. This is the module that is used to render the docs accessed through the shell through c:h/1,2,3. Example:

1> h(maps,new,0). -spec new() -> Map when Map :: #{}. Since: OTP 17.0 Returns a new empty map. Example: > maps:new(). #{}

This module formats and renders 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. It can also render any other format of "text" type, although those will be rendered as is.

The record holding EEP-48 documentation for a module. You can use code:get_doc/1 to fetch this information from a module.

The configuration of how the documentation should be rendered.

encoding Configure the encoding that should be used by the renderer for graphical details such as bullet-points. By default shell_docs uses the value returned by io:getopts(). ansi Configure whether ansi escape codes should be used to render graphical details such as bold and underscore. By default shell_docs will try to determine if the receiving shell supports ansi escape codes. It is possible to override the automated check by setting the kernel configuration parameter shell_docs_ansi to a boolean() value. columns Configure how wide the target documentation should be rendered. By default shell_docs used the value returned by io:columns().

The HTML tags allowed in application/erlang+html.

Render the documentation for a module or function.

Render the documentation for a module or function.

Render the documentation of a type in a module.

Render the documentation of a type in a module.

Render the documentation of a callback in a module.

Render the documentation of a callback in a module.

Validate the documentation

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

Normalize the documentation

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

Which tags are supported

This function can be used to find out which tags are supported by application/erlang+html documentation.