[erlang-questions] edoc and erlang code quoting

CT Radu ct.radu.001@REDACTED
Wed Jan 7 09:57:59 CET 2015


Hi all,

Does anyone know how to properly embed erlang code examples inside e @doc
tag ?

For example, I have something like:

%% @doc Mongo Query.
%% Answer example:
%% <code>
%%      [
%%       {<<"client">>, <<"ClientOne">>},
%%       {<<"client-dir">>, <<"/dir/path">>}
%%      ]
%% </code>
%% @end

I run edoc using  :
erl -pa ebin/ -noshell\
    -eval 'edoc:application(app_name, ".", [{source_path,
["/full/source/path"]}]), init:stop().'

And I get this:
2991- fatal: {invalid_name,"<\"clie"}
/full/source/path/module.erl, function get_clients_dirs/0: at line 156:
error in XML parser: {fatal,{{invalid_name,"<\"clie"},
                             {file,file_name_unknown},
                             {line,159},
                             {col,11}}}.
edoc: skipping source file '/full/source/path/module.erl': {'EXIT',error}.
edoc: error in doclet 'edoc_doclet': {'EXIT',error}.
{"init terminating in do_boot",error}

If you have any ideas on how I can generate this properly, I'll be
gratefull.
Costin-Tiberiu Radu,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150107/12dde725/attachment.htm>


More information about the erlang-questions mailing list