summaryrefslogtreecommitdiff
path: root/lualibs-util-str.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lualibs-util-str.lua')
-rw-r--r--lualibs-util-str.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lualibs-util-str.lua b/lualibs-util-str.lua
index de4a87e..c2139b1 100644
--- a/lualibs-util-str.lua
+++ b/lualibs-util-str.lua
@@ -1118,7 +1118,7 @@ function string.optionalquoted(str)
return lpegmatch(pattern,str) or str
end
-local pattern = Cs((newline / os.newline + 1)^0)
+local pattern = Cs((newline / (os.newline or "\r") + 1)^0)
function string.replacenewlines(str)
return lpegmatch(pattern,str)