# HG changeset patch # User Matthew Wild # Date 1258137557 0 # Node ID 71da0b9c138c38d68c71d33c11fd5283cb0b6b05 # Parent 370c51ee7b0699fdf65ad19862850777ce8c8078 Don't highlight table fields if they have the same name as local/global diff -r 370c51ee7b06 -r 71da0b9c138c lua2html.lua --- 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"..escape_html(op.comment).."%3"); + line, sub = line:gsub("([^%w_.])("..escape_pattern(op.comment)..")([^%w_])", "%1"..escape_html(op.comment).."%3"); if sub == 0 and op.name == "GETTABLE" then --print("Trying again..."); local id = op.comment:match("[%w_]+");