Thu, 09 Jul 2015 14:38:17 +0200
plugins.xkcd2: Allow negative numbers in pattern
plugins/xkcd2.lua | file | annotate | diff | comparison | revisions |
--- a/plugins/xkcd2.lua Thu Jul 09 14:34:36 2015 +0200 +++ b/plugins/xkcd2.lua Thu Jul 09 14:38:17 2015 +0200 @@ -17,7 +17,7 @@ local strip; if q then - local t, num = q:match("^([#\"]?)(%d+)\"?$"); + local t, num = q:match("^([#\"]?)(%-?%d+)\"?$"); if t ~= '"' then num = tonumber(num); if num and num < 0 then