diff --git a/stead/stead.lua b/stead/stead.lua index 88831a5..48cbb5e 100644 --- a/stead/stead.lua +++ b/stead/stead.lua @@ -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 diff --git a/stead/xact.lua b/stead/xact.lua index 53b00e1..6b20881 100644 --- a/stead/xact.lua +++ b/stead/xact.lua @@ -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