aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSun Howwrongbum <sun@libermatic.com>2021-12-31 16:48:58 +0530
committerSun Howwrongbum <sun@libermatic.com>2021-12-31 16:48:58 +0530
commitb25eb46b1b5a2e1633f994f3478d237a190f9f02 (patch)
treec1d005bb7257bcc0f2c190582ae5907800119847 /tools
parentb06ab631df79ebcace59478b44108e155ad802a6 (diff)
downloadtrackermap-server-b25eb46b1b5a2e1633f994f3478d237a190f9f02.tar.gz
trackermap-server-b25eb46b1b5a2e1633f994f3478d237a190f9f02.tar.bz2
trackermap-server-b25eb46b1b5a2e1633f994f3478d237a190f9f02.zip
docs: add line breaks in config descriptions
Diffstat (limited to 'tools')
-rw-r--r--tools/gen-config-doc.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/gen-config-doc.py b/tools/gen-config-doc.py
index c6d133ca6..62c4c535e 100644
--- a/tools/gen-config-doc.py
+++ b/tools/gen-config-doc.py
@@ -18,7 +18,12 @@ def get_config_key_descriptions():
try:
key_match = key_match_re.search(i[1])
if key_match:
- description = desc_re.sub("", i[0]).strip()
+ description = "<br /> ".join(
+ [
+ x.strip().replace("\n", "")
+ for x in desc_re.sub("\n", i[0]).strip().split("\n\n")
+ ]
+ )
terms = [x.strip() for x in key_split_re.split(key_match.group(1))]
key = terms[0].replace('"', "")
default = terms[2] if len(terms) == 3 else None
@@ -29,7 +34,7 @@ def get_config_key_descriptions():
{key} <span class="badge badge-dark">config</span>
</h5>
<p class="card-text">
- {description}{f" Default: {default}." if default else ""}
+ {description}{f"<br/ > Default: {default}." if default else ""}
</p>
</div>
</div>"""