Skip to content

Commit

Permalink
Fixed: #5978 support theming-webview-content
Browse files Browse the repository at this point in the history
Signed-off-by: MiaoWoo <admin@yumc.pw>
  • Loading branch information
502647092 committed Aug 19, 2019
1 parent 2d4c845 commit fdb8f60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugin-ext-vscode/src/node/plugin-vscode-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const doInitialization: BackendInitializationFn = (apiFactory: PluginAPIF
// redefine property
Object.defineProperty(panel.webview, 'html', {
set: function (html: string): void {
const newHtml = html.replace(new RegExp('vscode-resource:/', 'g'), 'webview/');
const newHtml = html.replace(new RegExp('vscode-resource:/', 'g'), 'webview/').replace(/<body>/, `<body class="vscode-dark">`);
this.checkIsDisposed();
if (this._html !== newHtml) {
this._html = newHtml;
Expand Down

0 comments on commit fdb8f60

Please sign in to comment.