lua2html.lua

changeset 5
71da0b9c138c
parent 2
520a1e0d187e
--- a/lua2html.lua	Fri Nov 13 18:38:39 2009 +0000
+++ b/lua2html.lua	Fri Nov 13 18:39:17 2009 +0000
@@ -87,7 +87,7 @@
 		for _, op in pairs(ops[linenum]) do
 			if op.comment and #op.comment > 0 and op.name ~= "JMP" then
 				--print("Replacing "..escape_pattern(op.comment).."("..op.comment..") for "..op.name);
-				line, sub = line:gsub("([^%w_])("..escape_pattern(op.comment)..")([^%w_])", "%1<span class='"..op.name:lower().."'>"..escape_html(op.comment).."</span>%3");
+				line, sub = line:gsub("([^%w_.])("..escape_pattern(op.comment)..")([^%w_])", "%1<span class='"..op.name:lower().."'>"..escape_html(op.comment).."</span>%3");
 				if sub == 0 and op.name == "GETTABLE" then
 					--print("Trying again...");
 					local id = op.comment:match("[%w_]+");

mercurial