File tree Expand file tree Collapse file tree
src/vs/workbench/contrib/extensions/browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -593,9 +593,19 @@ export class ExtensionEditor extends BaseEditor {
593593 webviewElement . layoutWebviewOverElement ( template . content ) ;
594594 }
595595 } ) ;
596-
597596 this . contentDisposables . add ( toDisposable ( removeLayoutParticipant ) ) ;
598597
598+ let isDisposed = false ;
599+ this . contentDisposables . add ( toDisposable ( ( ) => { isDisposed = true ; } ) ) ;
600+
601+ this . contentDisposables . add ( this . themeService . onThemeChange ( async ( ) => {
602+ // Render again since syntax highlighting of code blocks may have changed
603+ const body = await this . renderMarkdown ( cacheResult , template ) ;
604+ if ( ! isDisposed ) { // Make sure we weren't disposed of in the meantime
605+ webviewElement . html = body ;
606+ }
607+ } ) ) ;
608+
599609 this . contentDisposables . add ( webviewElement . onDidClickLink ( link => {
600610 if ( ! link ) {
601611 return ;
You can’t perform that action at this time.
0 commit comments