plugins/xkcd2.lua

changeset 122
f3a458479f9c
parent 115
6498ca5ed831
child 123
ce671935f504
--- 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

mercurial