diff options
author | the lemons <citrons@mondecitronne.com> | 2022-03-01 16:51:35 -0600 |
---|---|---|
committer | the lemons <citrons@mondecitronne.com> | 2022-03-01 16:51:35 -0600 |
commit | e4cc8e42daf9c69dfcb264652037bc089c1790c6 (patch) | |
tree | d09e60a601af6a3afb14ce58803c5653bc4aa2b5 | |
parent | 1d2e81782afb3addad4d7a47cc8a906006e1370b (diff) |
permit underscores and dashes in flag names
-rwxr-xr-x | zzcxz.cgi | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -170,7 +170,7 @@ local function parse_directive(line, directives, tmp_flags) directives.redirect = redirect elseif directive == "set" then if args:match "^%s*$" then return end - local flagname, text = args:match "^%s*(%w+)%s*(.-)%s*$" + local flagname, text = args:match "^%s*([%w%-_]+)%s*(.-)%s*$" if not flagname then return end text = text or "" if utf8.len(flagname) > 150 or utf8.len(text) > 1000 then @@ -179,12 +179,12 @@ local function parse_directive(line, directives, tmp_flags) directives.flags_updated[flagname] = text tmp_flags[flagname] = text elseif directive == "unset" then - local flagname = args:match "^%s*(%w+)%s*$" + local flagname = args:match "^%s*([%w%-_]+)%s*$" if not flagname then return end directives.flags_updated[flagname] = false tmp_flags[flagname] = nil elseif directive == "require" then - local flagname = args:match "^%s*(%w+)%s*$" + local flagname = args:match "^%s*([%w%-_]+)%s*$" if not flagname then return end directives.require[flagname] = true else |