commit 0a2cc00ddda101eadbe12e5b9c8f23c00fb7f9f3
Author: Enrico Forestieri <[email protected]>
Date: Tue Apr 22 22:16:45 2025 +0200
Correctly check maxima output for syntax errors
Recent versions of maxima now report "incorrect syntax" instead
of "Incorrect syntax" (note capitalization) so LyX was unable to
catch this kind of errors and compensate for them. Now the check
is performed case insensitively and hence works with any version.
---
src/mathed/MathExtern.cpp | 4 ++--
status.24x | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mathed/MathExtern.cpp b/src/mathed/MathExtern.cpp
index 990d35e9d2..6b3146de59 100644
--- a/src/mathed/MathExtern.cpp
+++ b/src/mathed/MathExtern.cpp
@@ -1128,7 +1128,7 @@ namespace {
out = captureOutput("maxima", to_utf8(full));
// leave loop if expression syntax is probably ok
- if (out.find("Incorrect syntax") == npos)
+ if (ascii_lowercase(out).find("incorrect syntax") ==
npos)
break;
// search line with "Incorrect syntax"
@@ -1136,7 +1136,7 @@ namespace {
string line;
while (is) {
getline(is, line);
- if (line.find("Incorrect syntax") != npos)
+ if (ascii_lowercase(line).find("incorrect
syntax") != npos)
break;
}
diff --git a/status.24x b/status.24x
index bbbd020580..105d586479 100644
--- a/status.24x
+++ b/status.24x
@@ -117,6 +117,8 @@ What's new
- Fix minor issues with automatic deletion of bibitem insets.
+- Correctly check maxima output for syntax errors.
+
* INTERNALS
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs