[latex3-commits] [l3svn] 03/05: l3build: Pick up another LuaTeX glue case

noreply at latex-project.org noreply at latex-project.org
Fri Sep 11 18:24:40 CEST 2015


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

joseph pushed a commit to branch master
in repository l3svn.

commit 90b6826619181e4e6e13f5ffad66d23c64429786
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Sep 11 16:42:26 2015 +0100

    l3build: Pick up another LuaTeX glue case
    
    This also means a bit of a refactor of the code here:
    still could probably be revised further.
---
 l3build/l3build.lua |   29 ++++++++++++++++++++++-------
 1 file changed, 22 insertions(+), 7 deletions(-)

diff --git a/l3build/l3build.lua b/l3build/l3build.lua
index 1323145..834b94c 100644
--- a/l3build/l3build.lua
+++ b/l3build/l3build.lua
@@ -812,13 +812,28 @@ function formatlualog(logfile, newfile)
     -- any bidi/vertical stuff will still show
     line = string.gsub(line, ", direction TLT", "")
     -- Find glue setting and round out the last place
-    line = string.gsub(
-        line,
-        "glue set (%-? ?)%d+.%d+",
-        "glue set %1" .. string.format(
-            "%.3f", string.match(line, "glue set %-? ?(%d+.%d+)") or 0
-          )
+    local function round_digits(l, m)
+      return string.gsub(
+        l,
+        m .. " (%-?)%d+%.%d+",
+        m .. " %1"
+          .. string.format(
+              "%.3f",
+              string.match(line, m .. " %-?(%d+%.%d+)") or 0
+            )
       )
+    end
+    if string.match(line, "glue set %-?%d+%.%d+") then
+      line = round_digits(line, "glue set")
+    end
+    if string.match(
+        line, "glue %-?%d+%.%d+ plus %-?%d+%.%d+ minus %-?%d+%.%d+$"
+      )
+      then
+      line = round_digits(line, "glue")
+      line = round_digits(line, "plus")
+      line = round_digits(line, "minus")
+    end
     -- LuaTeX writes ^^M as a new line, which we loose
     line = string.gsub(line, "%^%^M", "")
     -- Remove U+ notation in the "Missing character" message
@@ -850,7 +865,7 @@ function formatlualog(logfile, newfile)
       end
     end
     -- Look for another form of \discretionary, replacing a "-"
-    local pattern = "^%.+\\discretionary replacing *$"
+    pattern = "^%.+\\discretionary replacing *$"
     if string.match(line, pattern) then
       return "", line
     else

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


More information about the latex3-commits mailing list