[latex3-commits] [git/LaTeX3-latex3-latex3] master: Correct step-copyright-year code (eac352ad3)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Jan 2 11:32:25 CET 2020


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

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

commit eac352ad33d0deda83a28d9f7a44fb860b3e7546
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Jan 2 10:23:30 2020 +0000

    Correct step-copyright-year code


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

eac352ad33d0deda83a28d9f7a44fb860b3e7546
 build-config.lua   | 6 +++---
 l3kernel/build.lua | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/build-config.lua b/build-config.lua
index 450b182a5..3ba98ac5c 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,
-     "%-" .. year - 1 .. "," .. year,
+     "%-" .. tonumber(year) - 1 .. "," .. year,
      "-" .. year)
    content = string.gsub(content,
-     year - 2 .. "," .. year - 1 .. "," .. year,
-     year - 2 .. "-" .. year)
+     tonumber(year) - 2 .. "," .. tonumber(year) - 1 .. "," .. year,
+     tonumber(year) - 2 .. "-" .. year)
   end
   if string.match(file,"%.dtx$") then
     content = string.gsub(content,
diff --git a/l3kernel/build.lua b/l3kernel/build.lua
index 86d44896a..da321e926 100644
--- a/l3kernel/build.lua
+++ b/l3kernel/build.lua
@@ -61,11 +61,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,
+     "%-" .. tonumber(year) - 1 .. "," .. year,
      "-" .. year)
    content = string.gsub(content,
-     year - 2 .. "," .. year - 1 .. "," .. year,
-     year - 2 .. "-" .. year)
+     tonumber(year) - 2 .. "," .. tonumber(year) - 1 .. "," .. year,
+     tonumber(year) - 2 .. "-" .. year)
   end
   if string.match(file,"expl3%.dtx$") then
     content = string.gsub(content,





More information about the latex3-commits mailing list