From de9b2846156c2884e69ac538135cc0e36496db82 Mon Sep 17 00:00:00 2001 From: Guillaume Grossetie Date: Fri, 21 Jul 2023 15:35:37 +0200 Subject: [PATCH] resolves #762 move getContent call after generating the document header --- src/asciidoctorWebViewConverter.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/asciidoctorWebViewConverter.ts b/src/asciidoctorWebViewConverter.ts index 147edb0c..a76ed3dd 100644 --- a/src/asciidoctorWebViewConverter.ts +++ b/src/asciidoctorWebViewConverter.ts @@ -141,7 +141,6 @@ export class AsciidoctorWebViewConverter { const nonce = new Date().getTime() + '' + new Date().getMilliseconds() const webviewResourceProvider = this.webviewResourceProvider const csp = getCspForResource(webviewResourceProvider, this.securityLevel, nonce) - const content = node.getContent() const syntaxHighlighter = node.$syntax_highlighter() let assetUriScheme = node.getAttribute('asset-uri-scheme', 'https') if (assetUriScheme.trim() !== '') { @@ -174,7 +173,7 @@ export class AsciidoctorWebViewConverter { ${headerDocinfo} ${this.getDocumentHeader(node)}
- ${content} + ${node.getContent()}
${this.generateFootnotes(node)} ${this.generateFooter(node)}