From 4295a3eb51db73a87774d59fb3a38a54690319f7 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 22 May 2015 07:55:17 +0200 Subject: sync with Context as of 2015-05-22 --- lualibs-util-str.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lualibs-util-str.lua') 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) -- cgit v1.2.3