@@ -29,23 +29,22 @@ import { IExtensionService } from '../../../services/extensions/common/extension
2929import { getTelemetryLevel , supportsTelemetry } from '../../../../platform/telemetry/common/telemetryUtils.js' ;
3030import { IConfigurationChangeEvent , IConfigurationService } from '../../../../platform/configuration/common/configuration.js' ;
3131import { TelemetryLevel } from '../../../../platform/telemetry/common/telemetry.js' ;
32- import { DisposableStore } from '../../../../base/common/lifecycle.js' ;
32+ import { Disposable , DisposableStore } from '../../../../base/common/lifecycle.js' ;
3333import { SimpleSettingRenderer } from '../../markdown/browser/markdownSettingRenderer.js' ;
3434import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js' ;
3535import { Schemas } from '../../../../base/common/network.js' ;
3636import { ICodeEditorService } from '../../../../editor/browser/services/codeEditorService.js' ;
3737import { dirname } from '../../../../base/common/resources.js' ;
3838import { asWebviewUri } from '../../webview/common/webview.js' ;
3939
40- export class ReleaseNotesManager {
40+ export class ReleaseNotesManager extends Disposable {
4141 private readonly _simpleSettingRenderer : SimpleSettingRenderer ;
4242 private readonly _releaseNotesCache = new Map < string , Promise < string > > ( ) ;
4343
4444 private _currentReleaseNotes : WebviewInput | undefined = undefined ;
4545 private _lastMeta : { text : string ; base : URI } | undefined ;
46- private readonly disposables = new DisposableStore ( ) ;
4746
48- public constructor (
47+ constructor (
4948 @IEnvironmentService private readonly _environmentService : IEnvironmentService ,
5049 @IKeybindingService private readonly _keybindingService : IKeybindingService ,
5150 @ILanguageService private readonly _languageService : ILanguageService ,
@@ -60,12 +59,14 @@ export class ReleaseNotesManager {
6059 @IProductService private readonly _productService : IProductService ,
6160 @IInstantiationService private readonly _instantiationService : IInstantiationService ,
6261 ) {
63- TokenizationRegistry . onDidChange ( ( ) => {
62+ super ( ) ;
63+
64+ this . _register ( TokenizationRegistry . onDidChange ( ( ) => {
6465 return this . updateHtml ( ) ;
65- } ) ;
66+ } ) ) ;
6667
67- _configurationService . onDidChangeConfiguration ( this . onDidChangeConfiguration , this , this . disposables ) ;
68- _webviewWorkbenchService . onDidChangeActiveWebviewEditor ( this . onDidChangeActiveWebviewEditor , this , this . disposables ) ;
68+ this . _register ( _configurationService . onDidChangeConfiguration ( this . onDidChangeConfiguration ) ) ;
69+ this . _register ( _webviewWorkbenchService . onDidChangeActiveWebviewEditor ( this . onDidChangeActiveWebviewEditor ) ) ;
6970 this . _simpleSettingRenderer = this . _instantiationService . createInstance ( SimpleSettingRenderer ) ;
7071 }
7172
@@ -264,7 +265,6 @@ export class ReleaseNotesManager {
264265 const nonce = generateUuid ( ) ;
265266
266267 const content = await renderMarkdownDocument ( fileContent . text , this . _extensionService , this . _languageService , {
267- sanitizerConfig : 'skipSanitization' ,
268268 markedExtensions : [ {
269269 renderer : {
270270 html : this . _simpleSettingRenderer . getHtmlRenderer ( ) ,
0 commit comments