[latex3-commits] [l3svn] 02/02: l3build: Remove another LuaTeX \discretionary

noreply at latex-project.org noreply at latex-project.org
Thu Sep 10 22:38:07 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 6c4322b3e340c7e377b7c800c3c23d0e482ec7be
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Sep 10 21:36:38 2015 +0100

    l3build: Remove another LuaTeX \discretionary
    
    This looks for
    
        \discretionary replacing
        .\kern[length] -
        .\[font]
    
    and replaces it with just
    
        \kern[length] -
---
 l3build/l3build.lua |   21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/l3build/l3build.lua b/l3build/l3build.lua
index 290cb47..c47b921 100644
--- a/l3build/l3build.lua
+++ b/l3build/l3build.lua
@@ -833,7 +833,7 @@ function formatlualog(logfile, newfile)
     -- Where the last line was a discretionary, looks for the
     -- info one level in about what it represents
     if string.match(lastline, "^%.+\\discretionary$") then
-      prefix = string.gsub(string.match(lastline, "^(%.+)"), "%.", "%%.")
+      local prefix = string.gsub(string.match(lastline, "^(%.+)"), "%.", "%%.")
       if string.match(line, prefix .. "%.") or
          string.match(line, prefix .. "%|") then
         return "", lastline, true
@@ -848,6 +848,25 @@ function formatlualog(logfile, newfile)
         end
       end
     end
+    -- Look for another form of \discretionary, replacing a "-"
+    local pattern = "^%.+\\discretionary replacing *$"
+    if string.match(line, pattern) then
+      return "", line
+    else
+      if string.match(lastline, pattern) then
+        local prefix = string.gsub(
+            string.match(lastline, "^(%.+)"), "%.", "%%."
+          )
+        if string.match(line, prefix .. "%.\\kern") then
+          return string.gsub(line, "^%.", ""), lastline, true
+        elseif dropping then
+          return "", ""
+        else
+          line     = lastline .. "\n" .. line
+          lastline = ""
+        end
+      end
+    end
     -- Much the same idea when the last line was a whatsit,
     -- but things are simpler in this case
     if string.match(lastline, "^%.+\\whatsit$") then

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


More information about the latex3-commits mailing list