fixes in rep functions

This commit is contained in:
p.kosyh 2011-03-24 10:43:52 +00:00
parent 798a63bb10
commit e1c131e978
2 changed files with 2 additions and 2 deletions

View file

@ -394,7 +394,7 @@ function obj_xref(self,str)
return str;
end
local s = stead.string.gsub(str, '\\?[\\{}]',
{ ['{'] = '\001', ['}'] = '\002', [ '\\{' ] = '{', [ '\\}' ] = '}' }):gsub('\001([^\002]+)\002', xrefrep);
{ ['{'] = '\001', ['}'] = '\002', [ '\\{' ] = '{', [ '\\}' ] = '}' }):gsub('\001([^\002]+)\002', xrefrep):gsub('[\001\002]', { ['\001'] = '{', ['\002'] = '}' });
return s;
end

View file

@ -76,7 +76,7 @@ __do_xact = function(str, self)
end
if type(str) ~= 'string' then return end
local s = stead.string.gsub(str, '\\?[\\{}]',
{ ['{'] = '\001', ['}'] = '\002' }):gsub('\001([^\002]+)\002', xrefrep);
{ ['{'] = '\001', ['}'] = '\002' }):gsub('\001([^\002]+)\002', xrefrep):gsub('[\001\002]', { ['\001'] = '{', ['\002'] = '}' });
return s;
end