如何显示进程pid< 0.20071.1>在edoc?

时间:2015-10-25 04:10:16

标签: erlang

我想为erlang模块生成doc, 以下是该模块的代码:

%% @doc <strong>sysDtop</strong> is a tool for presenting information about erlang processes similar to the information presented by "top" in UNIX.
%%
%% <p><code>sysDtop</code> presents <code>top</code>-like information for an AXD301 CP.</p>
%% <code>sysDtop</code> info looks like this:
%% <pre>
%% cp1-1@avc386         size   40(36)M, cpu%   3, procs    582, runq   0  14:42:28
%% memory[kB]:  proc    9614, atom    1742, bin     128, code   18315, ets    5305
%% pid           name                       current           msgq     mem    reds
%% <0.20071.1>   sysDtop                    sysDtop:pinf/3       0  301416   99384
%% </pre>
%% <p>The info on the first status line is:<br></br>erlang node name, size in Mbyte (allocated(used)), cpu load, number of erlang processes, processes in erlang run queue, current time.</p>
%% <p>the second status line shows used memory in kBytes for different data types.</p>
%% <p>the info on the process lines is:<br></br>erlang pid, process name/entry point, current function, number of messages in message queue, size of process heap in Bytes, number of reductions last 5 seconds.</p>
%% <p>standard unix process info (from <code>ps</code>) follows.</p>

但是当我使用edoc:file生成edoc时,这是一个错误:

43> edoc:file("/vobs/mgwblade/SYF/SYF_CRA1190070/SYS_CNA11333/src/sysDtop.erl").
2991- fatal: {invalid_name,"0.2007"}
/vobs/mgwblade/SYF/SYF_CRA1190070/SYS_CNA11333/src/sysDtop.erl, in module header: at line 10: error in XML parser: {fatal,{{invalid_name,"0.2007"},
                             {file,file_name_unknown},
                             {line,18},
                             {col,4}}}.
** exception exit: error
     in function  edoc_tags:parse_tag/4 (edoc_tags.erl, line 279)
     in call from edoc_tags:parse_tags/5 (edoc_tags.erl, line 262)
     in call from edoc_extract:get_tags/6 (edoc_extract.erl, line 572)
     in call from edoc_extract:source1/5 (edoc_extract.erl, line 129)
     in call from edoc:read/2 (edoc.erl, line 538)
     in call from edoc:file/2 (edoc.erl, line 116)

错误显示当前fo <0.20071.1>错误,我该如何修改它?

1 个答案:

答案 0 :(得分:2)

EDoc支持XHTML markup language,其结果之一是解析器将pid <0.20071.1>作为标记,因此需要先将其转义为&lt0.20071.1&gt