[latex3-commits] [l3svn] 05/05: l3build: Replace \n by os_newline

noreply at latex-project.org noreply at latex-project.org
Fri Sep 11 18:24:42 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 670ee2c465868af33b28728d94c01f001906189f
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Sep 11 17:03:00 2015 +0100

    l3build: Replace \n by os_newline
---
 l3build/l3build.lua |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/l3build/l3build.lua b/l3build/l3build.lua
index a949861..d968fe1 100644
--- a/l3build/l3build.lua
+++ b/l3build/l3build.lua
@@ -746,7 +746,9 @@ function formatlog(logfile, newfile, engine)
     -- Zap line numbers from \show, \showbox, \box_show and the like
     -- Two stages as line wrapping alters some of them and restore the break
     line = string.gsub(line, "^l%.%d+ ", "l. ...")
-    line = string.gsub(line, "%.%.%.l%.%d+ ( *)%}$", "...\nl. ...%1}")
+    line = string.gsub(
+        line, "%.%.%.l%.%d+ ( *)%}$", "... " .. os_newline .. " l. ...%1}"
+      )
     -- Remove spaces at the start of lines: deals with the fact that LuaTeX
     -- uses a different number to the other engines
     line = string.gsub(line, "^%s+", "")
@@ -865,7 +867,7 @@ function formatlualog(logfile, newfile)
         else
           -- A normal (TeX90) discretionary:
           -- add with the line break reintroduced
-          return lastline .. "\n" .. line, ""
+          return lastline .. os_newline .. line, ""
         end
       end
     end
@@ -881,7 +883,7 @@ function formatlualog(logfile, newfile)
         elseif dropping then
           return "", ""
         else
-          return lastline .. "\n" .. line, ""
+          return lastline .. os_newline .. line, ""
         end
       end
     end
@@ -912,7 +914,7 @@ function formatlualog(logfile, newfile)
   for line in io.lines(logfile) do
     line, lastline, dropping = normalize(line, lastline, dropping)
     if not string.match(line, "^ *$") then
-      newlog = newlog .. line .. "\n"
+      newlog = newlog .. line .. os_newline
     end
   end
   local newfile = io.open(newfile, "w")

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


More information about the latex3-commits mailing list