From 983c002dd54cdf61dbcfc56523513bd4c3efb95d Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sun, 1 Jun 2008 02:26:56 +0000 Subject: [PATCH] More lyx2lyx fixes. Same issue. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25041 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/lyx2lyx/lyx_1_6.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/lyx2lyx/lyx_1_6.py b/lib/lyx2lyx/lyx_1_6.py index 894a1ad7d5..fcba708699 100644 --- a/lib/lyx2lyx/lyx_1_6.py +++ b/lib/lyx2lyx/lyx_1_6.py @@ -1474,10 +1474,11 @@ def revert_nobreakdash(document): def revert_nocite_key(body, start, end): 'key "..." -> \nocite{...}' + r = re.compile(r'^key "(.*)"') for i in range(start, end): - if (body[i][0:5] == 'key "'): - body[i] = body[i].replace('key "', "\\backslash\nnocite{") - body[i] = body[i].replace('"', "}") + m = r.match(body[i]) + if m: + body[i:i+1] = ["\\backslash", "nocite{" + m.group(1) + "}"] else: body[i] = "" -- 2.39.2