File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 15441544 "default" : true ,
15451545 "markdownDescription" : " Enable automatic refresh of R Markdown preview on file update."
15461546 },
1547+ "r.rmarkdown.preview.zoom" : {
1548+ "type" : " number" ,
1549+ "default" : 1 ,
1550+ "markdownDescription" : " Controls the zoom of the R Markdown preview."
1551+ },
15471552 "r.rmarkdown.knit.useBackgroundProcess" : {
15481553 "type" : " boolean" ,
15491554 "default" : true ,
Original file line number Diff line number Diff line change @@ -87,8 +87,11 @@ class RMarkdownPreview extends vscode.Disposable {
8787 const $ = cheerio . load ( content ) ;
8888 this . htmlLightContent = $ . html ( ) ;
8989
90+ const zoom = config ( ) . get < number > ( 'rmarkdown.preview.zoom' , 1 ) ;
91+
9092 // make the output chunks a little lighter to stand out
9193 let chunkCol = String ( config ( ) . get ( 'rmarkdown.chunkBackgroundColor' ) ) ;
94+
9295 let outCol : string ;
9396 if ( chunkCol ) {
9497 const colReg = / [ 0 - 9 . ] + / g;
@@ -106,6 +109,7 @@ class RMarkdownPreview extends vscode.Disposable {
106109 const style =
107110 `<style>
108111 body {
112+ zoom: ${ zoom } ;
109113 color: var(--vscode-editor-foreground);
110114 background: var(--vscode-editor-background);
111115 }
You can’t perform that action at this time.
0 commit comments