para fix, xroom better
This commit is contained in:
parent
c356322a3c
commit
b7a018793f
|
@ -6,7 +6,7 @@ stead.fmt = stead.hook(stead.fmt, function(f, ...)
|
|||
local r = f(unpack(arg))
|
||||
if type(r) == 'string' and stead.state then
|
||||
r = r:gsub('\n([^\n])', '<¶>%1'):gsub('<¶>[ \t]*', '\n'..txtnb(para_mod.space));
|
||||
r = r:gsub('^',txtnb(para_mod.space))
|
||||
r = r:gsub('^[ \t]*',txtnb(para_mod.space))
|
||||
end
|
||||
return r;
|
||||
end)
|
||||
|
|
|
@ -110,15 +110,10 @@ end
|
|||
|
||||
default_xdsc_obj = xdsc();
|
||||
|
||||
xroom = stead.hook(room, function(f, v, ...)
|
||||
if type(v) == 'table' then
|
||||
if v.obj == nil then
|
||||
v.obj = {}
|
||||
elseif type(v.obj) ~= 'table' then
|
||||
error("Wrong parameter to xroom.", 2);
|
||||
end
|
||||
-- we not use put here, to force saver do not save all list
|
||||
stead.table.insert(v.obj, 1, 'default_xdsc_obj');
|
||||
end
|
||||
return f(v, unpack(arg))
|
||||
xroom = stead.inherit(room, function(v)
|
||||
v.look = stead.hook(v.look, function(f, s,...)
|
||||
local xdsc = call(s, 'xdsc');
|
||||
return par(' ', xdsc, f(s, unpack(arg)));
|
||||
end)
|
||||
return v
|
||||
end)
|
||||
|
|
Loading…
Reference in a new issue