]> git.lyx.org Git - lyx.git/commitdiff
adapt tex2lyx to 0beb790a6a194
authorJuergen Spitzmueller <spitz@lyx.org>
Mon, 9 Sep 2024 06:29:24 +0000 (08:29 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Mon, 9 Sep 2024 06:29:24 +0000 (08:29 +0200)
src/tex2lyx/text.cpp

index 688286b7107b261783c8fa77e2ace1b203d8aa5e..042f314bc854889da40269c1b37e9d64ac4e09c2 100644 (file)
@@ -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";