From: Richard Heck Date: Sun, 1 Jun 2008 02:26:56 +0000 (+0000) Subject: More lyx2lyx fixes. Same issue. X-Git-Tag: 1.6.10~4585 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=983c002dd54cdf61dbcfc56523513bd4c3efb95d;p=features.git More lyx2lyx fixes. Same issue. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25041 a592a061-630c-0410-9148-cb99ea01b6c8 --- 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] = ""