Fix luametalatex.lua for Windows

This commit is contained in:
Marcel Krüger 2020-07-19 19:29:54 +02:00 committed by GitHub
parent 05c1977d9a
commit 537ff4d551
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -14,9 +14,9 @@ local arg_pattern, late_arg_pattern do
-- LuaMetaTeX needs -- to introduce parameters,
-- but fmtutil uses just -. Let's rewrite this on the fly:
local maybe_option = ('-' * ('-' + l.Cc'-') * #(early_args^-1))^-1
local quote = l.Cc(WINDOWS and '"' or "'")
local quote = l.Cc(os.type == 'windows' and '"' or "'")
local escape
if WINDOWS then
if os.type == 'windows' then
-- Windows: " -> "^"" The ^ is for cmd escaping, the """ is for command line splitting escaping,
-- backslashes still have to be escaped, but only in front of " or \
-- WARNING: This works with luametatex's argument splitting, but don't generally rely