我无法在 compodoc 的示例部分中插入引号



我正在用'compodoc'记录我的项目,我喜欢这个工具,但是当我尝试插入引号时,我得到了一个错误的视觉效果。

我有这个评论

/**
   * crea un arreglo de tamaño n
   *
   * @example
   * *ngFor="let item of 2 | numberToArray"
   *
   * @param length tamaño del nuevo arreglo
   *
   * @returns un arreglo de tamaño n
   */

我期待这个

example:
1| *ngFor="let item of 2 | numberToArray"

但实际输出是

example:
1| *ngFor="let item of 2 | numberToArray"

我有点困惑,因为您的预期输出与示例中的实际输出相同。尝试转义引号"Foo bar"

您可以删除 @example jsdoc 标记并将代码括在 '''ts 中。查看有关解决方法 https://github.com/compodoc/compodoc/issues/304 的更多信息

/**
 * crea un arreglo de tamaño n
 *
 * @example
 * *ngFor="let item of 2 | numberToArray"
 */

/**
 * crea un arreglo de tamaño n
 *
 * ```ts
 * *ngFor="let item of 2 | numberToArray"
 * ```
 */

最新更新