Skip to content

Commit

Permalink
fix: Ensure child comment tags get set (#1221)
Browse files Browse the repository at this point in the history
* add comments array to reflection object

* Fixed issue in CommentPlugin where comments were not always being entirely copied over to signature

* Fixed CommentPlugin issue where tags weren't always being copied over to child comments inside signatures. Also updated test specs to match the expected output. Should now output the `@see` tags defined in the comments for the test fat arrow functions
  • Loading branch information
epzilla committed Feb 28, 2020
1 parent 796349a commit 541fbcf
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/converter/plugins/CommentPlugin.ts
Expand Up @@ -307,6 +307,7 @@ export class CommentPlugin extends ConverterComponent {
childComment.shortText = childComment.shortText || comment.shortText;
childComment.text = childComment.text || comment.text;
childComment.returns = childComment.returns || comment.returns;
childComment.tags = childComment.tags || comment.tags;
}

if (signature.parameters) {
Expand Down
5 changes: 5 additions & 0 deletions src/test/renderer/specs/classes/_classes_.baseclass.html
Expand Up @@ -287,6 +287,11 @@ <h3>arrow<wbr>Function</h3>
<div class="lead">
<p>This is a simple fat arrow function.</p>
</div>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="https://github.com/sebastian-lenz/typedoc/issues/37">https://github.com/sebastian-lenz/typedoc/issues/37</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
Expand Down
5 changes: 5 additions & 0 deletions src/test/renderer/specs/classes/_classes_.subclassa.html
Expand Up @@ -391,6 +391,11 @@ <h3>arrow<wbr>Function</h3>
<div class="lead">
<p>This is a simple fat arrow function.</p>
</div>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="https://github.com/sebastian-lenz/typedoc/issues/37">https://github.com/sebastian-lenz/typedoc/issues/37</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
Expand Down
5 changes: 5 additions & 0 deletions src/test/renderer/specs/classes/_classes_.subclassb.html
Expand Up @@ -255,6 +255,11 @@ <h3>arrow<wbr>Function</h3>
<div class="lead">
<p>This is a simple fat arrow function.</p>
</div>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="https://github.com/sebastian-lenz/typedoc/issues/37">https://github.com/sebastian-lenz/typedoc/issues/37</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
Expand Down

0 comments on commit 541fbcf

Please sign in to comment.