From c451eefaf8b2f02865356c7d0bdeb87edd763b89 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Wed, 6 Aug 2008 12:59:54 +0000 Subject: [PATCH] Fix bug 5129. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26080 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/lyx2lyx/lyx_1_6.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/lyx2lyx/lyx_1_6.py b/lib/lyx2lyx/lyx_1_6.py index f5ebaf8805..ad8365038a 100644 --- a/lib/lyx2lyx/lyx_1_6.py +++ b/lib/lyx2lyx/lyx_1_6.py @@ -242,6 +242,11 @@ def latex2ert(line): return retval +#Bug 5022.... +#Might should do latex2ert first, then deal with stuff that DOESN'T +#end up inside ERT. That routine could be modified so that it returned +#a list of lines, and we could then skip ERT bits and only deal with +#the other bits. def latex2lyx(data): '''Takes a string, possibly multi-line, and returns the result of converting LaTeX constructs into LyX constructs. Returns a list of @@ -355,7 +360,7 @@ def lyx2latex(lines): else: # Do the LyX text --> LaTeX conversion for rep in reps: - line = line.replace(rep[1], rep[0]) + line = line.replace(rep[1], rep[0] + "{}") line = line.replace(r'\backslash', r'\textbackslash{}') line = line.replace(r'\series bold', r'\bfseries{}').replace(r'\series default', r'\mdseries{}') line = line.replace(r'\shape italic', r'\itshape{}').replace(r'\shape smallcaps', r'\scshape{}') -- 2.39.2