scansion/parser.lua

changeset 77
38066f635004
parent 72
4fde8d4a4c76
child 78
54bb54fe9ed2
--- 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*", "");

mercurial