[erlang-questions] edoc and erlang code quoting

Vlad Dumitrescu vladdu55@REDACTED
Wed Jan 7 10:07:23 CET 2015


Hi!

Since the doc is HTML, I think you need use '<' instead of '<' in the
code snippet.

regards,
Vlad


On Wed, Jan 7, 2015 at 9:57 AM, CT Radu <ct.radu.001@REDACTED> wrote:

> 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,
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150107/5c124502/attachment.htm>


More information about the erlang-questions mailing list