commit b5b3f56abb036edf2e03c6449e5ae16d576401ad
Author: Juergen Spitzmueller <[email protected]>
Date:   Wed Mar 2 12:48:10 2022 +0100

    Encoding::fromLaTeXCommand: properly record requirements when exiting early
---
 src/Encoding.cpp |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/Encoding.cpp b/src/Encoding.cpp
index a4c706b..d0610ef 100644
--- a/src/Encoding.cpp
+++ b/src/Encoding.cpp
@@ -390,6 +390,9 @@ docstring Encodings::fromLaTeXCommand(docstring const & 
cmd, int cmdtype,
                                        docstring value;
                                        value += unicodeSymbol.first;
                                        needsTermination = 
!unicodeSymbol.second.mathNoTermination();
+                                       if (req && 
unicodeSymbol.second.mathFeature()
+                                               && 
!unicodeSymbol.second.mathPreamble().empty())
+                                                       
req->insert(unicodeSymbol.second.mathPreamble());
                                        return value;
                                }
                        }
@@ -400,6 +403,9 @@ docstring Encodings::fromLaTeXCommand(docstring const & 
cmd, int cmdtype,
                                        docstring value;
                                        value += unicodeSymbol.first;
                                        needsTermination = 
!unicodeSymbol.second.textNoTermination();
+                                       if (req && 
unicodeSymbol.second.textFeature()
+                                               && 
!unicodeSymbol.second.textPreamble().empty())
+                                               
req->insert(unicodeSymbol.second.textPreamble());
                                        return value;
                                }
                        }
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to