Skip to content

Commit

Permalink
Comments panel strips outer markdown element, causing the link handle…
Browse files Browse the repository at this point in the history
…r to be omitted from the dom (#239940)

Fixes #239633
  • Loading branch information
alexr00 authored Feb 7, 2025
1 parent 09a758f commit 40ad35e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,10 @@ export class CommentNodeRenderer implements IListRenderer<ITreeNode<CommentNode>
templateData.disposables.push(disposables);
const renderedComment = this.getRenderedComment(originalComment.comment.body, disposables);
templateData.disposables.push(renderedComment);
templateData.threadMetadata.commentPreview.appendChild(renderedComment.element.firstElementChild ?? renderedComment.element);
for (let i = renderedComment.element.children.length - 1; i >= 1; i--) {
renderedComment.element.removeChild(renderedComment.element.children[i]);
}
templateData.threadMetadata.commentPreview.appendChild(renderedComment.element);
templateData.disposables.push(this.hoverService.setupManagedHover(getDefaultHoverDelegate('mouse'), templateData.threadMetadata.commentPreview, renderedComment.element.textContent ?? ''));
}

Expand Down

0 comments on commit 40ad35e

Please sign in to comment.