mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
Preserve whether comment body is markdown string in replies (#158569)
Part of microsoft/vscode-pull-request-github#3776
This commit is contained in:
@@ -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);
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user