]> git.lyx.org Git - lyx.git/commitdiff
Use the new put_cmd_in_ert routine in the xymatrix reversion routine.
authorRichard Heck <rgheck@comcast.net>
Mon, 29 Mar 2010 17:05:21 +0000 (17:05 +0000)
committerRichard Heck <rgheck@comcast.net>
Mon, 29 Mar 2010 17:05:21 +0000 (17:05 +0000)
Vincent, can you check (again) that I didn't break this wiht an off by
one error or something?

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33916 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_2_0.py

index 2bcd4b7719c7a6e83d3d4904c3bfc5170b826791..3392fec98fd474820e4047d4fbecb572fcf00b59 100644 (file)
@@ -1323,11 +1323,11 @@ def revert_equalspacing_xymatrix(document):
  
       if found != -1:
           has_equal_spacing = True
-          content = document.body[i][21:]
-          content += '\n'.join(document.body[i+1:j])
-          subst = [old_put_cmd_in_ert(content)]
+          content = [document.body[i][21:]]
+          content += document.body[i+1:j]
+          subst = put_cmd_in_ert(content)
           document.body[i:j+1] = subst
-          i += 1
+          i += len(subst)
       else:
           for curline in range(i,j):
               l = document.body[curline].find("\\xymatrix")