remove another newline case from empty fields

thanks to dlon: https://github.com/dae/anki/pull/273
This commit is contained in:
Damien Elmes 2019-01-29 08:29:01 +10:00
parent 6950a05260
commit 9911258802

View file

@ -289,7 +289,8 @@ class Editor:
print("uncaught cmd", cmd)
def mungeHTML(self, txt):
txt = re.sub(r"<br>$", "", txt)
if txt in ('<br>', '<div><br></div>'):
return ''
return txt
# Setting/unsetting the current note