revert_tabularvalign: fix removal of tabularvalign feature tag

This commit is contained in:
Juergen Spitzmueller 2015-12-27 17:34:01 +01:00
parent 6b5d5666ac
commit 106d89f7e6

View File

@ -89,10 +89,7 @@ def revert_tabularvalign(document):
if p != -1:
q = document.body[fline].find("tabularvalignment")
if q != -1:
# FIXME
# This seems wrong: It removes everything after
# tabularvalignment, too.
document.body[fline] = document.body[fline][:q - 1] + '>'
document.body[fline] = re.sub(r' tabularvalignment=\"[a-z]+\"', "", document.body[fline])
i += 1
continue
@ -108,10 +105,7 @@ def revert_tabularvalign(document):
# delete tabularvalignment
q = document.body[fline].find("tabularvalignment")
if q != -1:
# FIXME
# This seems wrong: It removes everything after
# tabularvalignment, too.
document.body[fline] = document.body[fline][:q - 1] + '>'
document.body[fline] = re.sub(r' tabularvalignment=\"[a-z]+\"', "", document.body[fline])
# don't add a box when centered
if tabularvalignment == 'c':