From b7c6126d92e98e20507d85ff78c6ae5b6deb67c8 Mon Sep 17 00:00:00 2001
From: Gabriel-Ladzaretti
 <97394622+Gabriel-Ladzaretti@users.noreply.github.com>
Date: Wed, 15 Jun 2022 18:04:23 +0300
Subject: [PATCH] docs: add whitespaces around items with multiple allowed
 values (#16085)

---
 tools/docs/config.ts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/docs/config.ts b/tools/docs/config.ts
index e98328eb9f..7a2a412424 100644
--- a/tools/docs/config.ts
+++ b/tools/docs/config.ts
@@ -141,6 +141,14 @@ function genTable(obj: [string, string][], type: string, def: any): string {
   return buildHtmlTable(data);
 }
 
+function stringifyArrays(el: Record<string, any>): void {
+  for (const [key, value] of Object.entries(el)) {
+    if (key !== 'default' && Array.isArray(value)) {
+      el[key] = value.join(', ');
+    }
+  }
+}
+
 export async function generateConfig(dist: string, bot = false): Promise<void> {
   let configFile = `configuration-options.md`;
   if (bot) {
@@ -162,6 +170,7 @@ export async function generateConfig(dist: string, bot = false): Promise<void> {
       }
       el.cli = getCliName(option);
       el.env = getEnvName(option);
+      stringifyArrays(el);
 
       configOptionsRaw[headerIndex] +=
         `\n${option.description}\n\n` +
-- 
GitLab