Don't add ": " when there's no name present

This commit is contained in:
Mc-muffin
2024-12-08 14:57:27 -05:00
parent 92e7096969
commit 08ac131950

View File

@@ -85,7 +85,10 @@ def entry_to_line_str(entry: SubEntry, index: int) -> list[str]:
content.append(f" {priority},")
content.append(f" {start_text},")
content.append(f" {end_text},")
content.append(f' {name} ": " {text}')
if name:
content.append(f' {name} ": " {text}')
else:
content.append(f' {text}')
content.append("};")
return content