diff --git a/src/ejabberd_commands_doc.erl b/src/ejabberd_commands_doc.erl index 6a97ccc0c..bf9ac32f3 100644 --- a/src/ejabberd_commands_doc.erl +++ b/src/ejabberd_commands_doc.erl @@ -87,7 +87,7 @@ md_tag(h2, V) -> md_tag(strong, V) -> [<<"*">>, V, <<"*">>]; md_tag('div', V) -> - [<<"
">>, V, <<"
">>]; + [<<"*Note* about the next option: ">>, V]; md_tag(_, V) -> V. diff --git a/src/ejabberd_doc.erl b/src/ejabberd_doc.erl index 3ea95f91b..389be0f81 100644 --- a/src/ejabberd_doc.erl +++ b/src/ejabberd_doc.erl @@ -152,7 +152,7 @@ opts_to_man(Lang, Backends) -> end, Backends). opt_to_man(Lang, {Option, Options}, Level) -> - [format_option(Lang, Option, Options)|format_desc(Lang, Options)] ++ + [format_option(Lang, Option, Options)|format_versions(Lang, Options)++format_desc(Lang, Options)] ++ format_example(Level, Lang, Options); opt_to_man(Lang, {Option, Options, Children}, Level) -> [format_option(Lang, Option, Options)|format_desc(Lang, Options)] ++ @@ -163,16 +163,17 @@ opt_to_man(Lang, {Option, Options, Children}, Level) -> lists:keysort(1, Children))]) ++ [io_lib:nl()|format_example(Level, Lang, Options)]. -format_option(Lang, Option, #{note := Note, value := Val}) -> - "\n\n_Note_ about the next option: " ++ Note ++ ":\n\n"++ - "*" ++ atom_to_list(Option) ++ "*: 'pass:[" ++ - tr(Lang, Val) ++ "]'::"; format_option(Lang, Option, #{value := Val}) -> "*" ++ atom_to_list(Option) ++ "*: 'pass:[" ++ tr(Lang, Val) ++ "]'::"; format_option(_Lang, Option, #{}) -> "*" ++ atom_to_list(Option) ++ "*::". +format_versions(Lang, #{note := Note}) -> + ["_Note_ about this option: " ++ Note ++ ". "]; +format_versions(_, _) -> + []. + format_desc(Lang, #{desc := Desc}) -> tr_multi(Lang, Desc).