summaryrefslogtreecommitdiff
path: root/srcinfo.lua
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-02-16 15:59:40 +0100
committerAki <please@ignore.pl>2024-02-16 15:59:40 +0100
commit868a808d2a9624df12555af8313995f86102a4c4 (patch)
treeef5c4f983895fa4db96b2a7373f1ba7d77344a56 /srcinfo.lua
parent392287e65104e54a6d3724ce64be6b2d709ca0e0 (diff)
downloadlua-srcinfo-master.zip
lua-srcinfo-master.tar.gz
lua-srcinfo-master.tar.bz2
Parser now handles trailing whitespace without newlineHEADmaster
Diffstat (limited to 'srcinfo.lua')
-rw-r--r--srcinfo.lua2
1 files changed, 1 insertions, 1 deletions
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