]> git.lyx.org Git - lyx.git/commitdiff
Avoid duplicate option passing with babel
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 24 Aug 2024 03:54:54 +0000 (05:54 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 24 Aug 2024 03:54:54 +0000 (05:54 +0200)
src/BufferParams.cpp

index 78223fa0a7df1eb35c5a5f65bc6a86fabea955fc..b6ca0e3eab1b5ef9138618522e11cee2c2c0fb9e 100644 (file)
@@ -3503,6 +3503,7 @@ string BufferParams::babelCall(LaTeXFeatures const & features, string lang_opts,
        langs.insert(language);
        for (auto const & l : langs) {
                string blang = l->babel();
+               bool use_opt = langoptions;
                if (blang.empty())
                        continue;
                if (l->babelOptFormat() == "modifier") {
@@ -3516,9 +3517,11 @@ string BufferParams::babelCall(LaTeXFeatures const & features, string lang_opts,
                                        blang = "modifiers." + blang + "=" + s;
                                        have_one = true;
                                }
+                               use_opt = true;
                        }
                }
-               blangs.push_back(blang);
+               if (use_opt)
+                       blangs.push_back(blang);
        }
        if (have_mods)
                lang_opts = getStringFromVector(blangs);