From 6f1d666323b3d5716b74e7fb4790b40380dcb8e6 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Mon, 28 Aug 2023 14:44:38 +0200 Subject: [PATCH] DEV: Make index.html a valid html (#23289) Co-authored-by: Godfrey Chan --- .../javascripts/bootstrap-json/index.js | 9 ++++++++- .../javascripts/discourse/app/index.html | 19 +++++++++---------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/bootstrap-json/index.js b/app/assets/javascripts/bootstrap-json/index.js index 3e7408e0193..eac1e3fbf0a 100644 --- a/app/assets/javascripts/bootstrap-json/index.js +++ b/app/assets/javascripts/bootstrap-json/index.js @@ -206,7 +206,14 @@ function replaceIn(bootstrap, template, id, headers, baseURL) { BUILDERS[id](buffer, bootstrap, headers, baseURL); let contents = buffer.filter((b) => b && b.length > 0).join("\n"); - return template.replace(``, contents); + if (id === "html-tag") { + return template.replace(``, contents); + } else { + return template.replace( + ``, + contents + ); + } } function extractPreloadJson(html) { diff --git a/app/assets/javascripts/discourse/app/index.html b/app/assets/javascripts/discourse/app/index.html index 5ba9b1d2455..6cb6f952edb 100644 --- a/app/assets/javascripts/discourse/app/index.html +++ b/app/assets/javascripts/discourse/app/index.html @@ -1,6 +1,5 @@ - - +