[latex3-commits] [l3svn] branch master updated: l3build: Normalise another LuaTeX \discretionary

noreply at latex-project.org noreply at latex-project.org
Wed Nov 18 10:16:45 CET 2015


This is an automated email from the git hooks/post-receive script.

joseph pushed a commit to branch master
in repository l3svn.

The following commit(s) were added to refs/heads/master by this push:
       new  a0241f8   l3build: Normalise another LuaTeX \discretionary
a0241f8 is described below

commit a0241f8c2e87afd11aa1166138fe6aca5ff57146
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Nov 18 09:04:51 2015 +0000

    l3build: Normalise another LuaTeX \discretionary
    
    This one shows up with the LaTEX2e tests but not (currently)
    any of the LaTeX3 ones.
---
 l3build/l3build.lua |   20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/l3build/l3build.lua b/l3build/l3build.lua
index 11d16d9..c11a3cb 100644
--- a/l3build/l3build.lua
+++ b/l3build/l3build.lua
@@ -858,9 +858,10 @@ function formatlualog(logfile, newfile)
   local function normalize(line, lastline, dropping)
     -- Find \discretionary or \whatsit lines:
     -- These may come back later
-    if string.match(line, "^%.+\\discretionary$")     or
-       string.match(line, "^%.+\\discretionary50%|$") or
-       string.match(line, "^%.+\\whatsit$")       then
+    if string.match(line, "^%.+\\discretionary$")                or
+       string.match(line, "^%.+\\discretionary50%|$")            or
+       string.match(line, "^%.+\\discretionary50%| replacing $") or
+       string.match(line, "^%.+\\whatsit$")                      then
       return "", line
     end
     -- For \mathon, we always need this line but the next
@@ -911,12 +912,19 @@ function formatlualog(logfile, newfile)
     end
     -- Where the last line was a discretionary, looks for the
     -- info one level in about what it represents
-    if string.match(lastline, "^%.+\\discretionary$")     or
-       string.match(lastline, "^%.+\\discretionary50%|$") then
+    if string.match(lastline, "^%.+\\discretionary$")                or
+       string.match(lastline, "^%.+\\discretionary50%|$")            or
+       string.match(lastline, "^%.+\\discretionary50%| replacing $") then
       local prefix = boxprefix(lastline)
       if string.match(line, prefix .. "%.") or
          string.match(line, prefix .. "%|") then
-        return "", lastline, true
+         if string.match(lastline, " replacing $") and
+            not dropping then
+           -- Modify the return line
+           return string.gsub(line, "^%.", ""), lastline, true
+         else
+           return "", lastline, true
+         end
       else
         if dropping then
           -- End of a \discretionary block

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list