Sat, 06 Feb 2016 14:38:17 +0000
Ignore shebangs at the top of a script
scansion/parser.lua | file | annotate | diff | comparison | revisions |
--- a/scansion/parser.lua Thu Feb 04 17:22:28 2016 +0000 +++ b/scansion/parser.lua Sat Feb 06 14:38:17 2016 +0000 @@ -34,7 +34,7 @@ -- Blank line or comment local in_header = (next(parsed.objects) == nil) and (next(parsed.actions) == nil); if in_header and #line > 0 then - if line_number == 1 then + if not parsed.title and not line:match("^#!") then parsed.title = line:gsub("^[#-]+%s*", ""); else parsed.summary = (parsed.summary and parsed.summary.."\n" or "")..line:gsub("^[#-]+%s*", "");