mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 08:22:24 -04:00
style: separate if-else-clauses by empty lines
This commit is contained in:
parent
984b5f9cb6
commit
c51388e37b
1 changed files with 7 additions and 0 deletions
|
@ -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_}"
|
||||||
|
|
Loading…
Reference in a new issue