parse_doxygen_xml: properly escape string literals

More recent Python versions complain, and they are not wrong.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
This commit is contained in:
Gerwin Klein 2025-07-14 10:56:33 +10:00
parent c8ee042688
commit dc66e46a62

View file

@ -350,12 +350,12 @@ class LatexGenerator(Generator):
return "\\param{void}{}{}"
def generate_errors(self, error_string):
"""
r"""
Wraps the errors in an \errortable
"""
if error_string:
return "\errortable{%s}" % error_string
return "\\errortable{%s}" % error_string
return ""
def generate_error_string(self, error_info, error_name):
@ -415,15 +415,15 @@ class MarkdownGenerator(Generator):
# Dict mapping characters to their escape sequence in markdown
ESCAPE_PATTERNS = {
"`": "\`",
"#": "\#",
"_": "\_",
"*": "\*",
"[": "\[",
"]": "\]",
"-": "\-",
"+": "\+",
"!": "\!",
"`": r"\`",
"#": r"\#",
"_": r"\_",
"*": r"\*",
"[": r"\[",
"]": r"\]",
"-": r"\-",
"+": r"\+",
"!": r"\!",
}
def get_parse_table(self):