[LyX/master] adapt tex2lyx to 0beb790a6a194

Juergen Spitzmueller spitz at lyx.org
Mon Sep 9 06:29:53 UTC 2024


commit f725abea051b54e2c41b71a6a98405babae316a7
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Mon Sep 9 08:29:24 2024 +0200

    adapt tex2lyx to 0beb790a6a194
---
 src/tex2lyx/text.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp
index 688286b710..042f314bc8 100644
--- a/src/tex2lyx/text.cpp
+++ b/src/tex2lyx/text.cpp
@@ -4574,7 +4574,12 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
 			os << "reference \"";
 			os << known_refstyle_prefixes[where - known_refstyle_commands]
 			   << ":";
-			os << convert_literate_command_inset_arg(p.getArg('{', '}'))
+			string arg = p.getArg('{', '}');
+			// with refstyle, labels containing blanks are grouped
+			// remove the grouping
+			if (contains(arg, ' '))
+				arg = ltrim(rtrim(arg, "}"), "{");
+			os << convert_literate_command_inset_arg(arg)
 			   << "\"\n";
 			os << "plural \"" << plural << "\"\n";
 			os << "caps \"" << cap << "\"\n";


More information about the lyx-cvs mailing list