plugins.xkcd: Don't pad with spaces

Mon, 21 Feb 2011 16:50:03 +0100

author
Kim Alvefur <zash@zash.se>
date
Mon, 21 Feb 2011 16:50:03 +0100
changeset 64
a317a5d4340c
parent 63
8f9675d0101d
child 65
25f4445447b2

plugins.xkcd: Don't pad with spaces

plugins/xkcd.lua file | annotate | diff | comparison | revisions
--- a/plugins/xkcd.lua	Mon Feb 21 16:30:31 2011 +0100
+++ b/plugins/xkcd.lua	Mon Feb 21 16:50:03 2011 +0100
@@ -41,8 +41,8 @@
 					:gsub("%%(%b[])",function(s) return (#s > 2 and "" or "%") .. s end);
 				local results = {};
 				for x, xkcd in pairs(xkcd_list) do
-					name = " "..xkcd:lower().." ";
-					if name:match(xkcdnum:lower():gsub("%-", "%%-")) then
+					name = xkcd:lower()
+					if name:match(xkcdnum:lower()) then
 						table.insert(results, x);
 						--return commands.xkcd(msg, x);
 					end

mercurial