您好我正在尝试将自定义标签添加到 JSDoc-toolkit。我发现的唯一有用的网站是:使用自定义标签,但它不起作用。
我也尝试过{+data.comment.getTag("customTag")[0]+}
,但没有运气。
您好我正在尝试将自定义标签添加到 JSDoc-toolkit。我发现的唯一有用的网站是:使用自定义标签,但它不起作用。
我也尝试过{+data.comment.getTag("customTag")[0]+}
,但没有运气。
我将它用于@TODO 标记并且可以工作。这是示例:
/**
* Working with cookies (set/get/delete)
* @namespace Cookies related methods
* @TODO serialize javascript object and store in cookie
*/
x.cookie = x.cookie || {};
/**
* Set cookie with name/value and expiration with one year
*
* @param {string} name
* @param {string} value
* @TODO write this method
*/
x.cookie.set = function(name, value) {
};
您可以在默认模板中添加第一个 @TODO,如下所示:
<!-- ============================== ToDo summary ======================== -->
{!
var todos = data.comment.getTag("TODO");
!}
<if test="todos.length">
<table class="summaryTable" cellspacing="0" summary="A summary of the TODOs documented in the class {+data.alias+}.">
<caption>TODO Summary</caption>
<thead>
<tr>
<th scope="col"></th>
<th scope="col">ToDo Description</th>
</tr>
</thead>
<tbody>
<for each="todo" in="todos">
<tr>
<td class="attributes">
</td>
<td class="nameDescription">
{+todo+}
</td>
</tr>
</for>
</tbody>
</table>
</if>
第二个,对于每种方法:
<if test="member.comment.getTag('TODO')[0]">
todo: {+ member.comment.getTag("TODO")[0] +}
</if>