From 25433c309d3474e19cc5a6d87abf7e2eaee981c8 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Wed, 1 Aug 2001 15:26:04 +0000 Subject: [PATCH] Paranoia check: make sure that there is no whitespace between the citation keys. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2401 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/ChangeLog | 5 +++++ src/insets/insetcite.C | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 0103a43f79..370cd03079 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2001-08-01 Angus Leeming + + * insetcite.C (latex): Paranoia check. Make sure that there is no + whitespace between the citation keys. + 2001-07-31 Juergen Vigna * insetcollapsable.h: removed inline variable and moved it over diff --git a/src/insets/insetcite.C b/src/insets/insetcite.C index d89732c80d..a02f0ed4af 100644 --- a/src/insets/insetcite.C +++ b/src/insets/insetcite.C @@ -90,7 +90,14 @@ int InsetCitation::latex(Buffer const * buffer, std::ostream & os, if (!getOptions().empty()) os << "[" << getOptions() << "]"; - os << "{" << getContents() << "}"; + // Paranoia check: make sure that there is no whitespace in here + string content; + for (string::const_iterator it = getContents().begin(); + it != getContents().end(); ++it) { + if (*it != ' ') content += *it; + } + + os << "{" << content << "}"; return 0; } -- 2.39.2