From f44f103c26e88a32b5c6a3ef98c986c7e33e8ec1 Mon Sep 17 00:00:00 2001 From: Gerwin Klein Date: Mon, 14 Jul 2025 11:16:22 +1000 Subject: [PATCH] parse_doxygen_xml: non-breaking space for types Use non-breaking space for types in markdown tables to avoid line breaks Signed-off-by: Gerwin Klein --- manual/tools/parse_doxygen_xml.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/manual/tools/parse_doxygen_xml.py b/manual/tools/parse_doxygen_xml.py index f6bead893..8bbd817a7 100755 --- a/manual/tools/parse_doxygen_xml.py +++ b/manual/tools/parse_doxygen_xml.py @@ -503,9 +503,15 @@ Type | Name | Description """ % param_string return "" + def make_nbsp(self, string): + """Make all spaces non-breaking""" + + # Use unicode non-breaking space. HTML   is not valid in all Markdown flavours. + return string.replace(" ", "\u00a0") + def generate_param_string(self, param_info, param_name): return "`%(type)s` | `%(name)s` | %(desc)s\n" % { - "type": self.get_text(param_info["type"], escape=False), + "type": self.make_nbsp(self.get_text(param_info["type"], escape=False)), "name": self.get_text(param_name, escape=False), "desc": self.todo_if_empty(param_info.get("desc", "").strip()), }