commit 81636e9faeba61e1a75fff9fcb0e0a29e012c4ee
Author: Juergen Spitzmueller <[email protected]>
Date: Mon Aug 3 08:45:16 2026 +0200
tex2lyx: detect more zero parfillskip settings
---
src/tex2lyx/Preamble.cpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp
index 546b0e8248..713d76f9fc 100644
--- a/src/tex2lyx/Preamble.cpp
+++ b/src/tex2lyx/Preamble.cpp
@@ -2241,7 +2241,10 @@ void Preamble::handle_package(Parser &p, string const &
name,
if (prefixIs(o, "parfill=")) {
// get value, unbraced
string const content =
rtrim(ltrim(token(o, '=', 1), "{"), "}");
- if (content == "0pt plus 1fil")
+ // any zero value plus 1fil
+ static regex const anyzero("0[a-z]{2}
plus 1fil");
+ smatch sub;
+ if (regex_search(content, sub, anyzero))
h_parfillskip_type = "none";
else if (content == ".3333\\linewidth
plus 1fil")
h_parfillskip_type =
"thirdline";
@@ -3537,7 +3540,10 @@ void Preamble::parse(Parser & p, string const &
forceclass,
else
h_defskip = translate_len(content);
} else if (name == "\\parfillskip") {
- if (content == "0pt plus 1fil")
+ // any zero value plus 1fil
+ static regex const anyzero("0[a-z]{2} plus
1fil");
+ smatch sub;
+ if (regex_search(content, sub, anyzero))
h_parfillskip_type = "none";
else if (content == ".3333\\linewidth plus
1fil")
h_parfillskip_type = "thirdline";
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs