[LyX/2.4.x] adapt tex2lyx to 0beb790a6a194
Richard Kimberly Heck
rikiheck at lyx.org
Mon Sep 9 22:11:16 UTC 2024
commit a7e8397a84c6f4435d943fc74a195758e0be4fe4
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Mon Sep 9 08:29:24 2024 +0200
adapt tex2lyx to 0beb790a6a194
(cherry picked from commit f725abea051b54e2c41b71a6a98405babae316a7)
---
src/tex2lyx/text.cpp | 7 ++++++-
status.24x | 2 ++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp
index af0be81231..d584d8c43b 100644
--- a/src/tex2lyx/text.cpp
+++ b/src/tex2lyx/text.cpp
@@ -4533,7 +4533,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";
diff --git a/status.24x b/status.24x
index 6e4d14663f..6ac251091d 100644
--- a/status.24x
+++ b/status.24x
@@ -88,6 +88,8 @@ What's new
- Handle linguistic structure trees in ePub and PDF (DocBook) output (bug 12372).
+- Improve the way spaces are handled in labels when refstyle is used.
+
* USER INTERFACE
More information about the lyx-cvs
mailing list