]> git.lyx.org Git - lyx.git/commitdiff
Whitespace.
authorRichard Heck <rgheck@comcast.net>
Mon, 7 Jul 2008 17:23:51 +0000 (17:23 +0000)
committerRichard Heck <rgheck@comcast.net>
Mon, 7 Jul 2008 17:23:51 +0000 (17:23 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25482 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_1_6.py

index ff6bb8fe023780a2ab64018b0e4c45224ccf8b95..c846f59ebeda809c2b0aabe8e76d0108e6137eb7 100644 (file)
@@ -803,33 +803,33 @@ def convert_latexcommand_index(document):
         r = re.compile('^(.*?)(\$.*?\$)(.*)')
         lines = fullcontent.split('\n')
         for line in lines:
-          #document.warning("LINE: " + line)
-          #document.warning(str(i) + ":" + document.body[i])
-          #document.warning("LAST: " + document.body[-1])
-          g = line
-          while r.match(g):
-            m = r.match(g)
-            s = m.group(1)
-            f = m.group(2).replace('\\\\', '\\')
-            g = m.group(3)
-            if s:
-              # this is non-math!
-              s = wrap_into_ert(s, r'\\', '\\backslash')
-              s = wrap_into_ert(s, '{', '{')
-              s = wrap_into_ert(s, '}', '}')
-              subst = s.split('\n')
-              document.body[i:i] = subst
-              i += len(subst)
-            document.body.insert(i + 1, "\\begin_inset Formula " + f)
-            document.body.insert(i + 2, "\\end_inset")
-            i += 2
-          # Generic, \\ -> \backslash:
-          g = wrap_into_ert(g, r'\\', '\\backslash')
-          g = wrap_into_ert(g, '{', '{')
-          g = wrap_into_ert(g, '}', '}')
-          subst = g.split('\n')
-          document.body[i+1:i+1] = subst
-          i += len(subst)
+            #document.warning("LINE: " + line)
+            #document.warning(str(i) + ":" + document.body[i])
+            #document.warning("LAST: " + document.body[-1])
+            g = line
+            while r.match(g):
+                m = r.match(g)
+                s = m.group(1)
+                f = m.group(2).replace('\\\\', '\\')
+                g = m.group(3)
+                if s:
+                  # this is non-math!
+                  s = wrap_into_ert(s, r'\\', '\\backslash')
+                  s = wrap_into_ert(s, '{', '{')
+                  s = wrap_into_ert(s, '}', '}')
+                  subst = s.split('\n')
+                  document.body[i:i] = subst
+                  i += len(subst)
+                document.body.insert(i + 1, "\\begin_inset Formula " + f)
+                document.body.insert(i + 2, "\\end_inset")
+                i += 2
+            # Generic, \\ -> \backslash:
+            g = wrap_into_ert(g, r'\\', '\\backslash')
+            g = wrap_into_ert(g, '{', '{')
+            g = wrap_into_ert(g, '}', '}')
+            subst = g.split('\n')
+            document.body[i+1:i+1] = subst
+            i += len(subst)
         document.body.insert(i + 1, "\\end_layout")