diff options
author | Karl Berry <karl@freefriends.org> | 2024-02-23 22:03:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-02-23 22:03:10 +0000 |
commit | 9e0b0b9845e5100ceb20fe50885ca0af77e2896c (patch) | |
tree | d9677663ea49bfa8b7c39ca438b88237130fe7e8 /Master/texmf-dist/scripts/gitinfo-lua | |
parent | dbd2472b1db146e6775b1f472806c667106dcf62 (diff) |
gitinfo-lua (23feb24)
git-svn-id: svn://tug.org/texlive/trunk@70096 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/gitinfo-lua')
-rw-r--r-- | Master/texmf-dist/scripts/gitinfo-lua/gitinfo-lua-cmd.lua | 2 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/gitinfo-lua/gitinfo-lua.lua | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/Master/texmf-dist/scripts/gitinfo-lua/gitinfo-lua-cmd.lua b/Master/texmf-dist/scripts/gitinfo-lua/gitinfo-lua-cmd.lua index 7e27bc05bae..5aa0dc56e55 100644 --- a/Master/texmf-dist/scripts/gitinfo-lua/gitinfo-lua-cmd.lua +++ b/Master/texmf-dist/scripts/gitinfo-lua/gitinfo-lua-cmd.lua @@ -41,7 +41,7 @@ function api:exec(command, do_caching, target_dir) local cmd = self.executable .. ' ' .. command local cwd = target_dir or self.cwd if cwd then - cmd = 'cd ' .. cwd .. ';' .. cmd + cmd = 'cd ' .. cwd .. ' && ' .. cmd end if do_caching then local found, result = cache:seek(cmd) diff --git a/Master/texmf-dist/scripts/gitinfo-lua/gitinfo-lua.lua b/Master/texmf-dist/scripts/gitinfo-lua/gitinfo-lua.lua index a1c2a6988b1..0f3a1315d3e 100644 --- a/Master/texmf-dist/scripts/gitinfo-lua/gitinfo-lua.lua +++ b/Master/texmf-dist/scripts/gitinfo-lua/gitinfo-lua.lua @@ -23,8 +23,8 @@ end local module = { name = 'gitinfo-lua', info = { - version = '1.0.1', --TAGVERSION - date = '2024/02/12', --TAGDATE + version = '1.0.2', --TAGVERSION + date = '2024/02/23', --TAGDATE comment = "Git info Lua — Git integration with LaTeX", author = "Erik Nijenhuis", license = "free" @@ -45,7 +45,8 @@ local api = { ['{'] = '\\{', ['}'] = '\\}', ['~'] = '\\textasciitilde ', - ['%^'] = '\\textasciicircum ' + ['%^'] = '\\textasciicircum ', + ['\n'] = ' ' } } local mt = { @@ -73,6 +74,7 @@ end function api:escape_str(value) local buf = string.gsub(value, '\\', '\\textbackslash ') + buf = string.gsub(buf, "\n%s*\n+", "\\par ") for search, replace in pairs(self.escape_chars) do buf = string.gsub(buf, search, replace) end |