From: José Matox Date: Mon, 12 Feb 2007 00:19:20 +0000 (+0000) Subject: Insurance against empty lines. X-Git-Tag: 1.6.10~10847 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=dc6ed95695934de2c4ae3bde2adf402d78b26008;p=features.git Insurance against empty lines. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17146 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/lyx2lyx/lyx_1_5.py b/lib/lyx2lyx/lyx_1_5.py index b559850430..2014f26d25 100644 --- a/lib/lyx2lyx/lyx_1_5.py +++ b/lib/lyx2lyx/lyx_1_5.py @@ -1107,7 +1107,7 @@ def normalize_font_whitespace(document): if len(words) > 1 and words[0] in char_properties.keys() \ and words[1] == char_properties[words[0]] \ - and lines[i-1][-1] == " ": + and lines[i-1] and lines[i-1][-1] == " ": lines[i-1] = lines[i-1][:-1] lines[i+1] = " " + lines[i+1]