commit e4a3527fa94b263dada55ea50334e895580c6bf7
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Sat Apr 14 14:33:21 2018 +0200

    Consider sub-subfiles on log file parsing.
    
    These are listed as (subfile.ext (sub-subfile.ext))
    
    Fixes: #11112
    (cherry picked from commit 1e1800a21aac99bb6e6044e1c1e11e3f88d198dd)
---
 src/LaTeX.cpp |   17 +++++++++++++----
 status.23x    |    2 ++
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp
index 753d196..df20f7b 100644
--- a/src/LaTeX.cpp
+++ b/src/LaTeX.cpp
@@ -1081,8 +1081,8 @@ bool completeFilename(string const & ff, DepTable & head)
 }
 
 
-int iterateLine(string const & token, regex const & reg, string const & 
closing,
-               int fragment_pos, DepTable & head)
+int iterateLine(string const & token, regex const & reg, string const & 
opening,
+               string const & closing, int fragment_pos, DepTable & head)
 {
        smatch what;
        string::const_iterator first = token.begin();
@@ -1099,6 +1099,15 @@ int iterateLine(string const & token, regex const & reg, 
string const & closing,
                                // since we had a closing bracket,
                                // do not investigate further
                                fragment = false;
+                       } else if (what.str(2) == opening) {
+                               // if we have another opening bracket,
+                               // we might have a nested file chain
+                               // as is (file.ext (subfile.ext))
+                               fragment = !handleFoundFile(rtrim(what.str(1)), 
head);
+                               // decrease first position by one in order to
+                               // consider the opening delimiter on next 
iteration
+                               if (first > token.begin())
+                                       --first;
                        } else
                                // if we have no closing bracket,
                                // try to handle as file nevertheless
@@ -1282,7 +1291,7 @@ void LaTeX::deplog(DepTable & head)
                if (regex_match(token, sub, reg5)) {
                        // search for strings in <...>
                        static regex const reg5_1("<([^>]+)(.)");
-                       fragment_pos = iterateLine(token, reg5_1, ">",
+                       fragment_pos = iterateLine(token, reg5_1, "<", ">",
                                                   fragment_pos, head);
                        fragment = (fragment_pos != -1);
                }
@@ -1295,7 +1304,7 @@ void LaTeX::deplog(DepTable & head)
                if (regex_match(token, sub, reg6)) {
                        // search for strings in (...)
                        static regex const reg6_1("\\(([^()]+)(.)");
-                       fragment_pos = iterateLine(token, reg6_1, ")",
+                       fragment_pos = iterateLine(token, reg6_1, "(", ")",
                                                   fragment_pos, head);
                        fragment = (fragment_pos != -1);
                }
diff --git a/status.23x b/status.23x
index 903ce7e..68efcd7 100644
--- a/status.23x
+++ b/status.23x
@@ -130,6 +130,8 @@ What's new
 
 - Load hyperref with a suitable driver (bug 6418).
 
+- Recompile grandchildren when they have updated (bug 11112).
+
 
 * LYX2LYX
 

Reply via email to