_fallback: INI sections must start with brackets (#2127)

Previously, IniFile.ReadFile created sections by checking for brackets
anywhere in the line, causing issues if a value had brackets. This
commit changes the section matching regex, so that only lines that
begin with a bracket can become sections.
This commit is contained in:
Renan Guilherme
2021-07-16 02:31:27 -07:00
committed by GitHub
parent 6510496658
commit 1b12bd32b7
+1 -1
View File
@@ -80,7 +80,7 @@ IniFile =
--ignore comments.
if not str:find("^%s*#") then
-- is this a section?
local sec = str:match( "%[(.+)%]" )
local sec = str:match( "^%[(.+)%]" )
-- if so, set focus there; otherwise, try to
-- read a key/value pair (ignore blank lines)