From 464b229c2c0de53a6a4ec828bd8fb94770347461 Mon Sep 17 00:00:00 2001 From: Peter Muessig Date: Mon, 1 Jun 2026 17:54:49 +0200 Subject: [PATCH] build: escape handlebars in step source README.md copies The previous fix wrapped {{ ... }} / {% ... %} placeholders in fenced code blocks and inline code spans only when generating the HTML pages under dist//build//README.md. The downloadable step sources copied to dist//steps//README.md were left untouched and went through Jekyll/Liquid as-is, so placeholders such as {{appTitle}} and {{appDescription}} were stripped on the published site. Run the README files copied alongside the step sources through escapeCodeBlocks() as well so both rendering paths preserve the handlebars placeholders verbatim. --- tools/builder/prepare-gh-pages.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/builder/prepare-gh-pages.js b/tools/builder/prepare-gh-pages.js index a1f1d0e6..7ec90cf1 100644 --- a/tools/builder/prepare-gh-pages.js +++ b/tools/builder/prepare-gh-pages.js @@ -209,6 +209,10 @@ function removeTSfromUI5YAML(ui5yaml) { } else if(file.endsWith(".yaml")) { const ui5yaml = removeTSfromUI5YAML(yaml.load(readFileSync(source, { encoding: "utf8" }))); writeFileSync(target, yaml.dump(ui5yaml)); + } else if (file.endsWith("README.md")) { + let content = escapeCodeBlocks(readFileSync(source, { encoding: "utf8"})); + mkdirSync(dirname(target), { recursive: true }); + writeFileSync(target, content, { encoding: "utf8" }); } else if (file !== "tsconfig.json") { mkdirSync(dirname(target), { recursive: true }); copyFileSync(source, target);