Skip to content

Commit 0fb7bc7

Browse files
committed
fix: trim leading whitespace when parsing statement lines
1 parent da6d33b commit 0fb7bc7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

htaccess.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,8 @@ local current_dir
813813
local stat_instructions_used = {}
814814
local stat_blocks_used = {}
815815
for statement in htaccess:gmatch('[^\r\n]+') do
816+
-- Trim leading whitespace
817+
statement = statement:gsub("^%s*", "");
816818
if statement:sub(1,1) == '<' then
817819
-- handle blocks
818820
if statement:sub(2,2) ~= '/' then

0 commit comments

Comments
 (0)