]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCitation.cpp
Don't add localswitch if no language changes
[lyx.git] / src / insets / InsetCitation.cpp
index 1d079c26cd1487bddcadeefa718e46584776fbae..24441268984d2525395e8a913f08ab108faad25c 100644 (file)
@@ -389,9 +389,12 @@ docstring InsetCitation::complexLabel(bool for_xhtml) const
        buffer().params().documentClass().addCiteMacro("!textafter", to_utf8(after));
        */
        docstring label;
-       vector<docstring> keys = getVectorFromString(key);
+       // we only really want the last 'false', to suppress trimming, but
+       // we need to give the other defaults, too, to set it.
+       vector<docstring> keys =
+               getVectorFromString(key, from_ascii(","), false, false);
        CitationStyle cs = getCitationStyle(buffer().masterParams(),
-                                           cite_type, buffer().masterParams().citeStyles());
+                       cite_type, buffer().masterParams().citeStyles());
        bool const qualified = cs.hasQualifiedList
                && (keys.size() > 1
                    || !getParam("pretextlist").empty()
@@ -427,8 +430,7 @@ docstring InsetCitation::basicLabel(bool for_xhtml) const
        do {
                // if there is no comma, then everything goes into key
                // and keys will be empty.
-               keys = trim(split(keys, key, ','));
-               key = trim(key);
+               keys = split(keys, key, ',');
                if (!label.empty())
                        label += ", ";
                label += wrapCitation(key, key, for_xhtml);