Skip to content

Commit 541fbcf

Browse files
authored
fix: Ensure child comment tags get set (#1221)
* 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
1 parent 796349a commit 541fbcf

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

src/lib/converter/plugins/CommentPlugin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ export class CommentPlugin extends ConverterComponent {
307307
childComment.shortText = childComment.shortText || comment.shortText;
308308
childComment.text = childComment.text || comment.text;
309309
childComment.returns = childComment.returns || comment.returns;
310+
childComment.tags = childComment.tags || comment.tags;
310311
}
311312

312313
if (signature.parameters) {

src/test/renderer/specs/classes/_classes_.baseclass.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,11 @@ <h3>arrow<wbr>Function</h3>
287287
<div class="lead">
288288
<p>This is a simple fat arrow function.</p>
289289
</div>
290+
<dl class="tsd-comment-tags">
291+
<dt>see</dt>
292+
<dd><p><a href="https://github.com/sebastian-lenz/typedoc/issues/37">https://github.com/sebastian-lenz/typedoc/issues/37</a></p>
293+
</dd>
294+
</dl>
290295
</div>
291296
<h4 class="tsd-parameters-title">Parameters</h4>
292297
<ul class="tsd-parameters">

src/test/renderer/specs/classes/_classes_.subclassa.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,11 @@ <h3>arrow<wbr>Function</h3>
391391
<div class="lead">
392392
<p>This is a simple fat arrow function.</p>
393393
</div>
394+
<dl class="tsd-comment-tags">
395+
<dt>see</dt>
396+
<dd><p><a href="https://github.com/sebastian-lenz/typedoc/issues/37">https://github.com/sebastian-lenz/typedoc/issues/37</a></p>
397+
</dd>
398+
</dl>
394399
</div>
395400
<h4 class="tsd-parameters-title">Parameters</h4>
396401
<ul class="tsd-parameters">

src/test/renderer/specs/classes/_classes_.subclassb.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,11 @@ <h3>arrow<wbr>Function</h3>
255255
<div class="lead">
256256
<p>This is a simple fat arrow function.</p>
257257
</div>
258+
<dl class="tsd-comment-tags">
259+
<dt>see</dt>
260+
<dd><p><a href="https://github.com/sebastian-lenz/typedoc/issues/37">https://github.com/sebastian-lenz/typedoc/issues/37</a></p>
261+
</dd>
262+
</dl>
258263
</div>
259264
<h4 class="tsd-parameters-title">Parameters</h4>
260265
<ul class="tsd-parameters">

0 commit comments

Comments
 (0)