# HG changeset patch # User Kim Alvefur # Date 1436445497 -7200 # Node ID f3a458479f9c122e0f30419d96811865031e9bc1 # Parent d68a4ae37f4a032fb8f5bfc591f8c21dd698629f plugins.xkcd2: Allow negative numbers in pattern diff -r d68a4ae37f4a -r f3a458479f9c plugins/xkcd2.lua --- 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