plugins.xeps: Fix pattern used to determine whether the user requested an example

Fri, 25 Mar 2011 19:20:14 +0100

author
Florian Zeitz <florob@babelmonkeys.de>
date
Fri, 25 Mar 2011 19:20:14 +0100
changeset 75
1b934a878e84
parent 74
65be10a5db6d
child 76
cecdfba8e625
child 80
5cb658e37a37

plugins.xeps: Fix pattern used to determine whether the user requested an example

plugins/xeps.lua file | annotate | diff | comparison | revisions
--- a/plugins/xeps.lua	Thu Mar 17 18:11:34 2011 +0100
+++ b/plugins/xeps.lua	Fri Mar 25 19:20:14 2011 +0100
@@ -30,7 +30,7 @@
 		local xepnum = command.param;
 		if not xepnum then return "Please supply an XEP number or a search string :)"; end
 			if not tonumber(xepnum) then -- Search for an XEP
-				if xepnum:match("^%d+ ex") then
+				if xepnum:match("^(%d+) ex%S* (%d+)$") then
 					local num, example = xepnum:match("^(%d+) ex%S* (%d+)$");
 					return "http://xmpp.org/extensions/xep-"..string.rep("0", 4-num:len())..num..".html#example-"..tostring(example);
 				end

mercurial