From b70a2fe4cf4e888f57f0d0faedddebc865cbc0af Mon Sep 17 00:00:00 2001 From: Badlop Date: Sun, 31 Mar 2024 01:03:49 +0100 Subject: [PATCH] Support for version note in modules too --- src/ejabberd_doc.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ejabberd_doc.erl b/src/ejabberd_doc.erl index 6a054a583..053e5826c 100644 --- a/src/ejabberd_doc.erl +++ b/src/ejabberd_doc.erl @@ -110,6 +110,7 @@ man(Lang) -> lists:duplicate(length(atom_to_list(M)), $~), "[[" ++ ModName ++ "]]", io_lib:nl()] ++ + format_versions(Lang, Example) ++ [io_lib:nl()] ++ tr_multi(Lang, Descr) ++ [io_lib:nl()] ++ opts_to_man(Lang, [{M, '', DocOpts}|Backends]) ++ format_example(0, Lang, Example) @@ -184,7 +185,7 @@ format_option(Lang, Option, #{value := Val} = Options) -> format_option(_Lang, Option, #{}) -> "*" ++ atom_to_list(Option) ++ "*::". -format_versions(_Lang, #{note := Note}) -> +format_versions(_Lang, #{note := Note}) when Note /= [] -> ["_Note_ about this option: " ++ Note ++ ". "]; format_versions(_, _) -> [].