Skip to content

Commit

Permalink
fix: incorrectly trimming comments
Browse files Browse the repository at this point in the history
Co-authored-by: Willow (GHOST) <ghostdevv@users.noreply.github.com>
  • Loading branch information
braebo and ghostdevv committed Dec 22, 2023
1 parent 2fecd9e commit e672f55
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tame-buses-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'extractinator': patch
---

fix: incorrectly trimming comments
6 changes: 4 additions & 2 deletions src/comments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ export function parseComment(commentString: string, parser: TSDocParser): TSDocC
* Renders a {@link DocNode} into a string.
*/
export function render(docNode: DocNode): string {
let result: string = ''
let result = '';

if (docNode) {
if (docNode instanceof DocExcerpt) {
result += docNode.content.toString()
Expand All @@ -190,5 +191,6 @@ export function render(docNode: DocNode): string {
result += render(childNode)
}
}
return result.trim()

return result
}

0 comments on commit e672f55

Please sign in to comment.