WikiDwarf
Created page with "local escape = { char = function(self, chr, args) args = args or {} local safe = args.safeChr or string.char(13) chr = tostring(chr or '\\') self[1] = ('%s0%%s%s'):format( ('%x%s%s'):format(chr:byte(), safe, safe), ('%s%x'):format(safe, chr:byte()) ) if not self[self[1]] then self[self[1]] = { char = chr, text = ('%s(.)'):format(chr), undo = self[1]:format'(%d+)' } end return args.text and self:text(args.text) or args.undo and..."