Quote -- everywhere in the SVG/XML comment

by adding spaces inbetween. Double replace to deal with multiple dashes
in as row. Otherwise a space would be added only every second gap due to
overlapping replacements.
This commit is contained in:
Florian Festi 2022-05-15 16:06:24 +02:00
parent 363b474b46
commit e6ef17c070
1 changed files with 2 additions and 2 deletions

View File

@ -461,12 +461,12 @@ Created with Boxes.py (https://festi.info/boxes.py)
Creation date: {date}
""".format(date=date, **md)
txt += "Command line (remove spaces between dashes): %s\n" % md["cli"].replace("--", "- -")
txt += "Command line (remove spaces between dashes): %s\n" % md["cli"]
if md["url"]:
txt += "Url: %s\n" % md["url"]
txt += "SettingsUrl: %s\n" % md["url"].replace("&render=1", "")
m = ET.Comment(txt)
m = ET.Comment(txt.replace("--", "- -").replace("--", "- -")) # ----
m.tail = '\n'
root.insert(0, m)