[latex3-commits] [git/LaTeX3-latex3-latex3] master: Correct copyright-update code (8a99e622e)

Joseph Wright joseph.wright at morningstar2.co.uk
Mon Feb 3 21:05:05 CET 2020


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/8a99e622e836ad8e7b8e6748ae0c10af34ce383f

>---------------------------------------------------------------

commit 8a99e622e836ad8e7b8e6748ae0c10af34ce383f
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Mon Feb 3 20:05:05 2020 +0000

    Correct copyright-update code


>---------------------------------------------------------------

8a99e622e836ad8e7b8e6748ae0c10af34ce383f
 build-config.lua    | 6 +++---
 l3backend/build.lua | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/build-config.lua b/build-config.lua
index 1d57d65a4..70fbf6d3b 100644
--- a/build-config.lua
+++ b/build-config.lua
@@ -46,11 +46,11 @@ function update_tag(file,content,tagname,tagdate)
       "(C) %1," .. year .. " The LaTeX3 Project")
    content = string.gsub(content,year .. "," .. year,year)
    content = string.gsub(content,
-     "%-" .. tonumber(year) - 1 .. "," .. year,
+     "%-" .. math.tointeger(year - 1) .. "," .. year,
      "-" .. year)
    content = string.gsub(content,
-     tonumber(year) - 2 .. "," .. tonumber(year) - 1 .. "," .. year,
-     tonumber(year) - 2 .. "-" .. year)
+     math.tointeger(year - 2) .. "," .. math.tointeger(year - 1) .. "," .. year,
+     math.tointeger(year - 2) .. "-" .. year)
   end
   if string.match(file,"%.dtx$") then
     content = string.gsub(content,
diff --git a/l3backend/build.lua b/l3backend/build.lua
index f98a65f21..ffb2059f7 100644
--- a/l3backend/build.lua
+++ b/l3backend/build.lua
@@ -40,11 +40,11 @@ function update_tag(file,content,tagname,tagdate)
       "(C) %1," .. year .. " The LaTeX3 Project")
    content = string.gsub(content,year .. "," .. year,year)
    content = string.gsub(content,
-     "%-" .. year - 1 .. "," .. year,
+     "%-" .. math.tointeger(year - 1) .. "," .. year,
      "-" .. year)
    content = string.gsub(content,
-     year - 2 .. "," .. year - 1 .. "," .. year,
-     year - 2 .. "-" .. year)
+     math.tointeger(year - 2) .. "," .. math.tointeger(year - 1) .. "," .. year,
+     math.tointeger(year - 2).. "-" .. year)
   end
   if string.match(file,"l3backend%-basics%.dtx$") then
     content = string.gsub(content,





More information about the latex3-commits mailing list.