[LyX/master] Avoid duplicate option passing with babel

Juergen Spitzmueller spitz at lyx.org
Sat Aug 24 03:55:29 UTC 2024


commit 8ff3e467a10d139a0b0f1190d3b07a39f0c63d4e
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Sat Aug 24 05:54:54 2024 +0200

    Avoid duplicate option passing with babel
---
 src/BufferParams.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index 78223fa0a7..b6ca0e3eab 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -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);


More information about the lyx-cvs mailing list