From fcd14084a4e900d73077a1a7a348b0a429834c5e Mon Sep 17 00:00:00 2001 From: Almenon Date: Mon, 5 Mar 2018 22:21:40 -0800 Subject: [PATCH] #37 accidentily fixed unrelated error --- src/HTMLDocumentContentProvider.ts | 34 +++++++++++++++++++----------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/src/HTMLDocumentContentProvider.ts b/src/HTMLDocumentContentProvider.ts index c0c134e..b3fd2f9 100644 --- a/src/HTMLDocumentContentProvider.ts +++ b/src/HTMLDocumentContentProvider.ts @@ -21,7 +21,7 @@ export default class HtmlDocumentContentProvider implements vscode.TextDocumentC css:string jsonRendererScript: string; errorContainer = '' - userVarContainer = `
`; + jsonRendererCode = `
`; printContainer = `
Print Output:
`; timeContainer = `

`; settings:vscode.WorkspaceConfiguration; @@ -51,9 +51,19 @@ export default class HtmlDocumentContentProvider implements vscode.TextDocumentC } public updateContent(){ + // todo: handle different themes. check body class: https://code.visualstudio.com/updates/June_2016 - this.html = this.css + this.jsonRendererScript + this.errorContainer + - this.userVarContainer + this.printContainer + this.timeContainer; + this.html = ` + ${this.css} + ${this.jsonRendererScript} + ${this.jsonRendererCode} + + + ${this.errorContainer} +
+ ${this.printContainer} + ${this.timeContainer} + ` // issue #1: need to make sure html is new each time or wierd crap happens this.html += `` @@ -88,15 +98,15 @@ export default class HtmlDocumentContentProvider implements vscode.TextDocumentC // escape end script tag or else the content will escape its container and WREAK HAVOC userVarsCode = userVarsCode.replace(/<\/script>/g,'<\\/script>') - let jsonRendererCode = `` - - this.userVarContainer = `
${jsonRendererCode}
` + this.jsonRendererCode = `` } private updateTime(time:number){