ng: Fix bug that would create a VirtualHost""
Seems * in patterns behave differently before Lua 5.3 Thanks to tarneo for reporting this issue
This commit is contained in:
@@ -16,7 +16,7 @@ local function _split(s, sep)
|
||||
if not s then return nil; end
|
||||
sep = sep or ",";
|
||||
local parts = {};
|
||||
for part in s:gmatch("[^"..sep.."]*") do
|
||||
for part in s:gmatch("[^"..sep.."]+") do
|
||||
parts[#parts+1] = part;
|
||||
end
|
||||
return parts;
|
||||
|
||||
@@ -16,7 +16,7 @@ local function _split(s, sep)
|
||||
if not s then return nil; end
|
||||
sep = sep or ",";
|
||||
local parts = {};
|
||||
for part in s:gmatch("[^"..sep.."]*") do
|
||||
for part in s:gmatch("[^"..sep.."]+") do
|
||||
parts[#parts+1] = part;
|
||||
end
|
||||
return parts;
|
||||
|
||||
@@ -16,7 +16,7 @@ local function _split(s, sep)
|
||||
if not s then return nil; end
|
||||
sep = sep or ",";
|
||||
local parts = {};
|
||||
for part in s:gmatch("[^"..sep.."]*") do
|
||||
for part in s:gmatch("[^"..sep.."]+") do
|
||||
parts[#parts+1] = part;
|
||||
end
|
||||
return parts;
|
||||
|
||||
Reference in New Issue
Block a user