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 57d566d670
commit 318765cb2e

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