From 6f94e1de93379302a3be4f9ae62037fe6a7a0c22 Mon Sep 17 00:00:00 2001 From: Max Wolfs Date: Wed, 24 Jul 2024 12:24:29 +0200 Subject: [PATCH 1/2] add misssing trim to avoid double white spaces Signed-off-by: Max Wolfs add misssing trim to avoid double white spaces Signed-off-by: Max Wolfs --- populateStds.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/populateStds.js b/populateStds.js index a6ab825de0..5313dd8e5e 100644 --- a/populateStds.js +++ b/populateStds.js @@ -201,9 +201,9 @@ ${headerLegend} title = title.substring(ref.title.length) if (title.startsWith(':')) title = title.substring(1).trimStart() } - lines.push(`| | | Supplement: ${title} | ${versionList} |`) - tlines.push(`| | Supplement: ${title} | ${versionList} |`) - slines.push(`\n## Supplement: ${title}\n`) + lines.push(`| | | Supplement: ${title.trim()} | ${versionList} |`) + tlines.push(`| | Supplement: ${title.trim() } | ${versionList} |`) + slines.push(`\n## Supplement: ${title.trim() }\n`) slines.push('| Version | State | stabilized | deprecated |') slines.push('| -------- | ------- | ---------- | ---------- |') versions.forEach((obj) => { From e421a6a3515fd21e8c6583ff4e0e8b6ff16cb420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20B=C3=BCchse?= Date: Wed, 24 Jul 2024 13:48:53 +0200 Subject: [PATCH 2/2] alternative solution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Büchse --- populateStds.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/populateStds.js b/populateStds.js index 5313dd8e5e..c84ca704c3 100644 --- a/populateStds.js +++ b/populateStds.js @@ -199,11 +199,12 @@ ${headerLegend} ).join(' | ') if (title.startsWith(ref.title)) { title = title.substring(ref.title.length) - if (title.startsWith(':')) title = title.substring(1).trimStart() + if (title.startsWith(':')) title = title.substring(1) + title = title.trimStart() } - lines.push(`| | | Supplement: ${title.trim()} | ${versionList} |`) - tlines.push(`| | Supplement: ${title.trim() } | ${versionList} |`) - slines.push(`\n## Supplement: ${title.trim() }\n`) + lines.push(`| | | Supplement: ${title} | ${versionList} |`) + tlines.push(`| | Supplement: ${title} | ${versionList} |`) + slines.push(`\n## Supplement: ${title}\n`) slines.push('| Version | State | stabilized | deprecated |') slines.push('| -------- | ------- | ---------- | ---------- |') versions.forEach((obj) => {