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:
Kim Alvefur 2023-12-02 17:52:53 +01:00
parent aa886a0b49
commit 0581c684a5
3 changed files with 3 additions and 3 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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;