You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
diff --git a/manual.lua b/manual.lua
index 1d6b44e..0abd3a9 100644
--- a/manual.lua+++ b/manual.lua@@ -7,7 +7,8 @@ local function ReadFile(input)
print("Error in reading " .. input)
return
end
- local text = f:read("*all")+ -- normalize line endings, https://stackoverflow.com/a/20599512+ local text = f:read("*all"):gsub('\r\n?', '\n')
f:close()
return text
end
to overcome lua error
manual.lua:29: attempt to concatenate a nil value (local 'body')
thrown when executing texlua manual.lua. Even then, a Git warning
warning: in the working copy of 'tabularray.tex', LF will be replaced by CRLF the next time Git touches it
is encountered.
tabularray (and perhaps other open source repos by the same author) need a workflow to allow users on OS's using different EOL characters working together.
I guess replacing "rb" and "wb" with "r' and "w" will solve eol problem among different operating systems, if we also modify MakeManual function below, adding some \r characters.
localfunctionReadFile(input)
localf=io.open(input, "rb")
iff==nilthenprint("Error in reading " ..input)
returnendlocaltext=f:read("*all")
f:close()
returntextendlocalfunctionWriteFile(output, text)
f=io.open(output, "wb")
f:write(text)
f:close()
end
Originally posted by @muzimuzhi in #443 (comment)
Originally posted by @lvjr in #443 (comment)
The text was updated successfully, but these errors were encountered: