]> git.lyx.org Git - lyx.git/commitdiff
Check for uppercase marker after style prefix has been stripped
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 13 Jul 2024 15:16:34 +0000 (17:16 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 13 Jul 2024 15:16:34 +0000 (17:16 +0200)
src/TextClass.cpp

index 43731e14cc2bd8ef2b319fb9be6d607ad49d074b..da58054fb304cc14dfe03a659100c45f95209217 100644 (file)
@@ -1161,10 +1161,6 @@ bool TextClass::readCiteEngine(Lexer & lexrc, ReadType rt, bool const add)
                char ichar = def[0];
                if (ichar == '#')
                        continue;
-               if (isUpperCase(ichar)) {
-                       cs.forceUpperCase = true;
-                       def[0] = lowercase(ichar);
-               }
 
                /** For portability reasons (between different
                 *  cite engines such as natbib and biblatex),
@@ -1230,6 +1226,11 @@ bool TextClass::readCiteEngine(Lexer & lexrc, ReadType rt, bool const add)
                        lyx_cmd = split(lyx_cmd, style, '@');
                        cs.styles = getVectorFromString(style);
                }
+               char fchar = lyx_cmd[0];
+               if (isUpperCase(fchar)) {
+                       cs.forceUpperCase = true;
+                       lyx_cmd[0] = lowercase(fchar);
+               }
                cs.name = lyx_cmd;
                cs.cmd = latex_cmd.empty() ? lyx_cmd : latex_cmd;
                if (!alias.empty()) {