From 868a808d2a9624df12555af8313995f86102a4c4 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 16 Feb 2024 15:59:40 +0100 Subject: Parser now handles trailing whitespace without newline --- srcinfo.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'srcinfo.lua') diff --git a/srcinfo.lua b/srcinfo.lua index 058b9c6..c038641 100644 --- a/srcinfo.lua +++ b/srcinfo.lua @@ -43,7 +43,7 @@ local comment = lpeg.Cc"comment" * whitespace * lpeg.P"#" * lpeg.C(rest) local empty = lpeg.Cc"empty" * whitespace local invalid = lpeg.Cc"invalid" * lpeg.C(rest) local line = lpeg.Carg(1) * (definition + comment + empty + invalid) / apply * newline -local capture = lpeg.Ct(line^0) * -lpeg.P(1) +local capture = lpeg.Ct(line^0) * whitespace * -lpeg.P(1) local -- cgit v1.1