Explorar o código

Update \gitrevision command definition

Samuel W. Flint %!s(int64=4) %!d(string=hai) anos
pai
achega
67fbaa8b8a
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      texmf/version-and-copyright.sty

+ 6 - 1
texmf/version-and-copyright.sty

@@ -7,7 +7,12 @@
 \ProcessOptions\relax
 
 \newcommand\vc@getRev{\ShellEscape{git rev-parse --short HEAD > \jobname.ver}}
-\newcommand\gitrevision{\vc@getRev\input{\jobname.ver}}
+\newcommand\gitrevision{%
+  \vc@getRev%
+  \edef\RestoreEndlinechar{\endlinechar=\the\endlinechar\relax}%
+  \endlinechar=-1%
+  \input{\jobname.ver}%
+  \RestoreEndlinechar}
 
 \newcommand\copyrightRange[1]{\copyright~#1\ifnumgreater{\year}{#1}{--\the\year}{}}