From 3a2153b287f6e2c9067810ca308bfe06ce6cfd60 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Mon, 7 Jul 2008 17:23:51 +0000 Subject: [PATCH] Whitespace. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25482 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/lyx2lyx/lyx_1_6.py | 54 +++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/lib/lyx2lyx/lyx_1_6.py b/lib/lyx2lyx/lyx_1_6.py index ff6bb8fe02..c846f59ebe 100644 --- a/lib/lyx2lyx/lyx_1_6.py +++ b/lib/lyx2lyx/lyx_1_6.py @@ -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") -- 2.39.2