[latex3-commits] [l3svn] 01/03: Allow for "%" line ends in custom setversion code

noreply at latex-project.org noreply at latex-project.org
Fri Nov 6 23:18:11 CET 2015


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

joseph pushed a commit to branch master
in repository l3svn.

commit c323b6c98f7fb4a9f46661fd4825f2e44cd61c5a
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Nov 6 21:18:46 2015 +0000

    Allow for "%" line ends in custom setversion code
    
    This will be useful following some upcoming 'paranoia' changes.
---
 build-config.lua |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/build-config.lua b/build-config.lua
index 4e5a463..38eb9e4 100644
--- a/build-config.lua
+++ b/build-config.lua
@@ -26,11 +26,11 @@ end
 function setversion_update_line(line, date, version)
   local date = string.gsub(date, "%-", "/")
   -- Replace the identifiers
-  if string.match(line, "^\\def\\ExplFileDate{%d%d%d%d/%d%d/%d%d}$") then
-    line = "\\def\\ExplFileDate{" .. date .. "}"
+  if string.match(line, "^\\def\\ExplFileDate{%d%d%d%d/%d%d/%d%d}%%?$") then
+    line = string.gsub(line, "%d%d%d%d/%d%d/%d%d", date)
   end
-  if string.match(line, "^\\def\\ExplFileVersion{%d+}$") then
-    line = "\\def\\ExplFileVersion{" .. version .. "}"
+  if string.match(line, "^\\def\\ExplFileVersion{%d+}%%?$") then
+    line = string.gsub(line, "%d+", version)
   end
   -- Update the interlock
   if string.match(

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


More information about the latex3-commits mailing list