Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve whether comment body is markdown string in replies #158569

Merged
merged 1 commit into from Aug 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/vs/workbench/api/common/extHostComments.ts
Expand Up @@ -119,7 +119,7 @@ export function createExtHostComments(mainContext: IMainContext, commands: ExtHo
return arg;
}

const body = arg.text;
const body: string = arg.text;
const commentUniqueId = arg.commentUniqueId;

const comment = commentThread.getCommentByUniqueId(commentUniqueId);
Expand All @@ -128,7 +128,12 @@ export function createExtHostComments(mainContext: IMainContext, commands: ExtHo
return arg;
}

comment.body = body;
// If the old comment body was a markdown string, use a markdown string here too.
if (typeof comment.body === 'string') {
comment.body = body;
} else {
comment.body.value = body;
}
return comment;
}

Expand Down