Normalize the begining of Tabular insets (+ cosmetics: remove spaces at the end of lines)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23823 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2008-03-19 09:40:24 +00:00
parent a0f4be8515
commit 7535cabd60

View File

@ -76,9 +76,13 @@ def convert_tablines(document):
while True: while True:
i = find_token(document.body, "\\begin_inset Tabular", i) i = find_token(document.body, "\\begin_inset Tabular", i)
if i == -1: if i == -1:
# LyX 1.3 inserted an extra space between \begin_inset
# and Tabular so let us try if this is the case and fix it.
i = find_token(document.body, "\\begin_inset Tabular", i) i = find_token(document.body, "\\begin_inset Tabular", i)
if i == -1: if i == -1:
return return
else:
document.body[i] = "\\begin_inset Tabular"
j = find_end_of_inset(document.body, i + 1) j = find_end_of_inset(document.body, i + 1)
if j == -1: if j == -1:
document.warning("Malformed LyX document: Could not find end of tabular.") document.warning("Malformed LyX document: Could not find end of tabular.")