From 4ba1768d29f59b0d09b544ac84e8182f79d08796 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Mon, 3 Jan 2022 13:29:12 +0100 Subject: [PATCH] Treat all parameter descriptions as markdown in the web UI --- boxes/generators/roundedbox.py | 2 +- scripts/boxesserver | 2 +- static/self.css | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/boxes/generators/roundedbox.py b/boxes/generators/roundedbox.py index 92ff96c..008a2db 100644 --- a/boxes/generators/roundedbox.py +++ b/boxes/generators/roundedbox.py @@ -42,7 +42,7 @@ With lid: help="Radius of the corners in mm") self.argparser.add_argument( "--wallpieces", action="store", type=int, default=1, - choices=[1, 2, 3, 4], help="# pieces of outer wall") + choices=[1, 2, 3, 4], help="\# pieces of outer wall") self.argparser.add_argument( "--edge_style", action="store", type=boxes.ArgparseEdgeType("fFh"), choices=list("fFh"), diff --git a/scripts/boxesserver b/scripts/boxesserver index fb55ac1..7c49225 100755 --- a/scripts/boxesserver +++ b/scripts/boxesserver @@ -158,7 +158,7 @@ class BServer: default = defaults.get(name, None) row = """%s%%s%s\n""" % \ - (_(viewname), "" if not a.help else _(a.help)) + (_(viewname), "" if not a.help else markdown.markdown(_(a.help))) if (isinstance(a, argparse._StoreAction) and hasattr(a.type, "html")): input = a.type.html(name, default or a.default, _) diff --git a/static/self.css b/static/self.css index 1178f16..d69c8a5 100644 --- a/static/self.css +++ b/static/self.css @@ -71,6 +71,10 @@ table { margin-left: 30px; } +table tr p { + display: inline; +} + /* Container */ .container {