From: José Matox Date: Tue, 15 Feb 2005 12:04:26 +0000 (+0000) Subject: Fix bug 1816. X-Git-Tag: 1.6.10~14537 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=46cacd9dc5f61637b57fa93904ecfdaad18757b4;p=lyx.git Fix bug 1816. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9633 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/lyx2lyx/ChangeLog b/lib/lyx2lyx/ChangeLog index 17fb51b0a4..1dbb09b576 100644 --- a/lib/lyx2lyx/ChangeLog +++ b/lib/lyx2lyx/ChangeLog @@ -1,3 +1,7 @@ +2005-02-15 José Matos + + * lyx_1_2.py (remove_pextra): fix bug 1816. + 2005-02-06 Georg Baum * lyx_1_4.py (convert_ertbackslash): convert '\n', too diff --git a/lib/lyx2lyx/lyx_1_2.py b/lib/lyx2lyx/lyx_1_2.py index d42540f1bf..5e39dd5f8c 100644 --- a/lib/lyx2lyx/lyx_1_2.py +++ b/lib/lyx2lyx/lyx_1_2.py @@ -136,6 +136,7 @@ def remove_oldfloat(file): pextra_type2_rexp = re.compile(r".*\\pextra_type\s+[12]") pextra_type2_rexp2 = re.compile(r".*(\\layout|\\pextra_type\s+2)") +pextra_widthp = re.compile(r"\\pextra_widthp") def remove_pextra(file): lines = file.body @@ -146,6 +147,12 @@ def remove_pextra(file): if i == -1: break + # Sometimes the \pextra_widthp argument comes in it own + # line. If that happens insert it back in this line. + if pextra_widthp.search(lines[i+1]): + lines[i] = lines[i] + ' ' + lines[i+1] + del lines[i+1] + mo = pextra_rexp.search(lines[i]) width = get_width(mo)