繁体   English   中英

JSDOC 注释格式

[英]JSDOC Comment format

我在 static 属性吸气剂中的 polymer class 中有一个属性,定义如下,并在属性上方对其进行评论。

  /**
  * when textElement is empty, textElement (<text> tag) is used for limited text instead of advanced text features.
  * @name textElement
  * @alias textElement
  * @memberof ABC
  * @type {Boolean}
  */
  textElement: {
    type: String,
    value: ''
  },

我正在使用 JSDOC 生成相同的文档,我遇到了一个奇怪的问题,在生成的文档中,这就是在属性上提到的注释的样子。

when textElement is empty, textElement ( tag) is used for limited text instead of advanced text features.

不知何故,在评论中不理解<text>生成文档 JSDOC 时。

对此的任何见解都会有所帮助,谢谢:)

这些块被视为 markdown,因此您的<text>将被忽略为不可转换的 html。

使用反引号`<text>`转义标签)或使用\<转义“小于”符号。

例如:

  * when textElement is empty, textElement (`<text>` tag) is used for limited text instead of advanced text features.

  * when textElement is empty, textElement (\<text> tag) is used for limited text instead of advanced text features.

我设法解决了这个问题,正如我们所知。

  • &lt; 代表 [小于号][1] ( < )。
  • &gt; 代表 [大于号][2] ( > )。

<替换为&lt; 和 > 与&gt; 在评论中将解决问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM