don't remove empty spans

The regex was not matching nested spans properly, leading to invalid output on
decks like the Heisig one.
This commit is contained in:
Damien Elmes 2012-09-20 16:28:08 +09:00
parent 8e1ed0dacd
commit b01f089ee1

View file

@ -475,7 +475,6 @@ order by ordinal""", mid)):
t[k] = re.sub("(?i)font-family: ?arial;?", "", t[k]) t[k] = re.sub("(?i)font-family: ?arial;?", "", t[k])
t[k] = re.sub("color: ?#000(000)?;?", "", t[k]) t[k] = re.sub("color: ?#000(000)?;?", "", t[k])
t[k] = re.sub("white-space: ?pre-wrap;?", "", t[k]) t[k] = re.sub("white-space: ?pre-wrap;?", "", t[k])
t[k] = re.sub('<span style=" *">(.+?)</span>', '\\1', t[k])
# new furigana handling # new furigana handling
if "japanese" in m['name'].lower(): if "japanese" in m['name'].lower():
if k == 'qfmt': if k == 'qfmt':