mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Change formatting of commands markdown documentation
This commit is contained in:
parent
9dbdeba6c1
commit
60a8623929
@ -363,10 +363,6 @@ gen_doc(#ejabberd_commands{name=Name, tags=_Tags, desc=Desc, longdesc=LongDesc,
|
|||||||
args=Args, args_desc=ArgsDesc,
|
args=Args, args_desc=ArgsDesc,
|
||||||
result=Result, result_desc=ResultDesc}=Cmd, HTMLOutput, Langs) ->
|
result=Result, result_desc=ResultDesc}=Cmd, HTMLOutput, Langs) ->
|
||||||
try
|
try
|
||||||
LDesc = case LongDesc of
|
|
||||||
"" -> Desc;
|
|
||||||
_ -> LongDesc
|
|
||||||
end,
|
|
||||||
ArgsText = case ArgsDesc of
|
ArgsText = case ArgsDesc of
|
||||||
none ->
|
none ->
|
||||||
[?TAG(ul, "args-list", [gen_param(AName, Type, undefined, HTMLOutput)
|
[?TAG(ul, "args-list", [gen_param(AName, Type, undefined, HTMLOutput)
|
||||||
@ -393,8 +389,12 @@ gen_doc(#ejabberd_commands{name=Name, tags=_Tags, desc=Desc, longdesc=LongDesc,
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
[?TAG(h1, [?TAG(strong, atom_to_list(Name)), <<" - ">>, ?RAW(Desc)]),
|
[?TAG(h1, atom_to_list(Name)),
|
||||||
?TAG(p, ?RAW(LDesc)),
|
?TAG(p, ?RAW(Desc)),
|
||||||
|
case LongDesc of
|
||||||
|
"" -> [];
|
||||||
|
_ -> ?TAG(p, ?RAW(LongDesc))
|
||||||
|
end,
|
||||||
?TAG(h2, <<"Arguments:">>), ArgsText,
|
?TAG(h2, <<"Arguments:">>), ArgsText,
|
||||||
?TAG(h2, <<"Result:">>), ResultText,
|
?TAG(h2, <<"Result:">>), ResultText,
|
||||||
?TAG(h2, <<"Examples:">>), gen_calls(Cmd, HTMLOutput, Langs)]
|
?TAG(h2, <<"Examples:">>), gen_calls(Cmd, HTMLOutput, Langs)]
|
||||||
|
Loading…
Reference in New Issue
Block a user