style: separate if-else-clauses by empty lines

This commit is contained in:
David Culley 2024-07-10 13:45:55 +02:00
parent 984b5f9cb6
commit c51388e37b
No known key found for this signature in database
GPG key ID: E6D8947E83ACCD4F

View file

@ -304,25 +304,32 @@ require("anki/ui").loaded.then(() => require("anki/NoteEditor").instances[0].too
image_element = f'<img class="topbut" src="{iconstr}">' image_element = f'<img class="topbut" src="{iconstr}">'
else: else:
image_element = "" image_element = ""
if label or not image_element: if label or not image_element:
label_element = label or cmd label_element = label or cmd
else: else:
label_element = "" label_element = ""
if id: if id:
idstr = f"id={id}" idstr = f"id={id}"
else: else:
idstr = "" idstr = ""
if toggleable: if toggleable:
toggleScript = "toggleEditorButton(this);" toggleScript = "toggleEditorButton(this);"
else: else:
toggleScript = "" toggleScript = ""
tip = shortcut(tip) tip = shortcut(tip)
if rightside: if rightside:
class_ = "linkb" class_ = "linkb"
else: else:
class_ = "rounded" class_ = "rounded"
if not disables: if not disables:
class_ += " perm" class_ += " perm"
return f"""<button tabindex=-1 return f"""<button tabindex=-1
{idstr} {idstr}
class="{class_}" class="{class_}"