diff options
Diffstat (limited to 'src/ejabberd_commands_doc.erl')
-rw-r--r-- | src/ejabberd_commands_doc.erl | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ejabberd_commands_doc.erl b/src/ejabberd_commands_doc.erl index adcbc6d9..dc00c5d2 100644 --- a/src/ejabberd_commands_doc.erl +++ b/src/ejabberd_commands_doc.erl @@ -32,7 +32,7 @@ -include("ejabberd_commands.hrl"). -include("ejabberd.hrl"). --define(RAW(V), if HTMLOutput -> xml:crypt(iolist_to_binary(V)); true -> iolist_to_binary(V) end). +-define(RAW(V), if HTMLOutput -> fxml:crypt(iolist_to_binary(V)); true -> iolist_to_binary(V) end). -define(TAG(N), if HTMLOutput -> [<<"<", ??N, "/>">>]; true -> md_tag(N, <<"">>) end). -define(TAG(N, V), if HTMLOutput -> [<<"<", ??N, ">">>, V, <<"</", ??N, ">">>]; true -> md_tag(N, V) end). -define(TAG(N, C, V), if HTMLOutput -> [<<"<", ??N, " class='", C, "'>">>, V, <<"</", ??N, ">">>]; true -> md_tag(N, V) end). @@ -79,9 +79,9 @@ md_tag(pre, V) -> md_tag(p, V) -> [<<"\n\n">>, V, <<"\n">>]; md_tag(h1, V) -> - [<<"\n## ">>, V, <<"\n">>]; + [<<"\n\n## ">>, V, <<"\n">>]; md_tag(h2, V) -> - [<<"\n### ">>, V, <<"\n">>]; + [<<"\n\n### ">>, V, <<"\n">>]; md_tag(strong, V) -> [<<"*">>, V, <<"*">>]; md_tag(_, V) -> @@ -158,7 +158,7 @@ java_call(Name, ArgsDesc, Values, HTMLOutput) -> Indent, ?ID_L("client"), ?OP_L("."), ?ID_L("setConfig"), ?OP_L("("), ?ID_L("config"), ?OP_L(");"), ?BR, Indent, ?BR, Indent, ?ID_L("client"), ?OP_L("."), ?ID_L("execute"), ?OP_L("("), ?STR_A(Name), ?OP_L(", "), java_gen_map(lists:map(fun({A,B})->java_gen(A, B, Indent, HTMLOutput) end, lists:zip(ArgsDesc, Values)), Indent, HTMLOutput), - ?OP_L(");"), ?BR]. + ?OP_L(");")]. -define(XML_S(N, V), ?OP_L("<"), ?FIELD_L(??N), ?OP_L(">"), V). -define(XML_E(N), ?OP_L("</"), ?FIELD_L(??N), ?OP_L(">")). @@ -360,8 +360,9 @@ gen_doc(#ejabberd_commands{name=Name, tags=_Tags, desc=Desc, longdesc=LongDesc, none -> [?RAW(io_lib:format("~p", [Result]))]; _ -> - [?RAW(io_lib:format("~p", [Result])), - ?TAG_R(p, ResultDesc)] + [?TAG(dl, [ + ?TAG(dt, io_lib:format("~p", [Result])), + ?TAG_R(dd, ResultDesc)])] end, [?TAG(h1, [?TAG(strong, atom_to_list(Name)), <<" - ">>, ?RAW(Desc)]), |