Small cleanup follow up on #236145

- Don't send content as json
- Reuse existing load helper
This commit is contained in:
Matt Bierner
2024-12-17 11:59:05 -08:00
parent 5e26b3d7c3
commit a47b13ebc2
3 changed files with 17 additions and 14 deletions

View File

@@ -99,7 +99,7 @@ export class MdDocumentRenderer {
data-settings="${escapeAttribute(JSON.stringify(initialData))}"
data-strings="${escapeAttribute(JSON.stringify(previewStrings))}"
data-state="${escapeAttribute(JSON.stringify(state || {}))}"
data-md-content="${escapeAttribute(JSON.stringify(encodeURIComponent(body.html)))}">
data-initial-md-content="${escapeAttribute(body.html)}">
<script src="${this._extensionResourcePath(resourceProvider, 'pre.js')}" nonce="${nonce}"></script>
${this._getStyles(resourceProvider, sourceUri, config, imageInfo)}
<base href="${resourceProvider.asWebviewUri(markdownDocument.uri)}">