25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +01:00

Update markdown text for version notes, to work with mkdocs

This commit is contained in:
Badlop 2024-03-20 15:31:22 +01:00
parent 71b9db688a
commit effcf0b7cf
2 changed files with 7 additions and 6 deletions

View File

@ -87,7 +87,7 @@ md_tag(h2, V) ->
md_tag(strong, V) ->
[<<"*">>, V, <<"*">>];
md_tag('div', V) ->
[<<"<div class='note-down'>">>, V, <<"</div>">>];
[<<"*Note* about the next option: ">>, V];
md_tag(_, V) ->
V.

View File

@ -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).