Inconsistent font size in a comment with code blocks (#146542)

Fixes #146183
This commit is contained in:
Alex Ross 2022-04-20 13:26:29 +02:00 committed by GitHub
parent c7b2eeadb4
commit 36d7dd2a57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -23,6 +23,7 @@ export interface IMarkdownRenderResult extends IDisposable {
export interface IMarkdownRendererOptions {
editor?: ICodeEditor;
codeBlockFontFamily?: string;
codeBlockFontSize?: string;
}
/**
@ -93,6 +94,10 @@ export class MarkdownRenderer {
element.style.fontFamily = this._options.codeBlockFontFamily;
}
if (this._options.codeBlockFontSize !== undefined) {
element.style.fontSize = this._options.codeBlockFontSize;
}
return element;
},
asyncRenderCallback: () => this._onDidRenderAsync.fire(),

View file

@ -193,7 +193,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
this._scopedInstantiationService,
this._commentThread as unknown as languages.CommentThread<IRange | ICellRange>,
this._pendingComment,
{ editor: this.editor },
{ editor: this.editor, codeBlockFontSize: '' },
this._commentOptions,
{
actionRunner: () => {