lyx2lyx: fix convert_chunks for empty chunk layouts

Fixes: #9298
This commit is contained in:
Juergen Spitzmueller 2014-10-15 14:07:14 +02:00
parent 3ca8502ae9
commit 6f3fbc9cd3
2 changed files with 8 additions and 1 deletions

View File

@ -4577,9 +4577,14 @@ def convert_chunks(document):
# The last chunk should simply have an "@" in it
# or at least end with "@" (can happen if @ is
# preceded by a newline)
lastpar = ''.join(contents[-1])
lastpar = ''
if len(contents) > 0:
lastpar = ''.join(contents[-1])
if not lastpar.endswith("@"):
document.warning("Unexpected chunk content: chunk not terminated by '@'!")
if len(contents) == 0:
# convert empty chunk layouts to Standard
document.body[start] = "\\begin_layout Standard"
continue
if lastpar == "@":

View File

@ -81,6 +81,8 @@ What's new
- Fix import of LyX 2.0 IEEEtran documents (bug 9273).
- Fix import of Chunk layout with trailing empty paragraph (bug 9298).
* USER INTERFACE