On Wednesday 19 March 2008 09:40:25 [EMAIL PROTECTED] wrote:
> @@ -76,9 +76,13 @@
> while True:
> i = find_token(document.body, "\\begin_inset Tabular", i)
> 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)
> if i == -1:
> return
> + else:
> + document.body[i] = "\\begin_inset Tabular"
> j = find_end_of_inset(document.body, i + 1)
> if j == -1:
> document.warning("Malformed LyX document: Could not find end
> of tabular.")
I took the chance to fix this further by adding a comment explaining why we
are testing this and fixing so that no further tests are necessary from now
on.
Ideally I should have incremented the file format, but this change is only
relevant if lyx2lyx was used but not lyx. The changes applies also for lyx
files generated by lyx-1.3 and previous but not touched by more recent
versions. So given these constraints it is easier to fix this once and for
all now.
--
José Abílio