mirror of https://github.com/mpastell/Weave.jl
Fix displayed output produced by capture_output
parent
e7e5bd7c7f
commit
4d7a444246
|
@ -228,14 +228,12 @@ function capture_output(expr, SandBox::Module, term, disp,
|
||||||
reader = @async read(rw, String)
|
reader = @async read(rw, String)
|
||||||
try
|
try
|
||||||
obj = Core.eval(SandBox, expr)
|
obj = Core.eval(SandBox, expr)
|
||||||
if (term || disp) && typeof(expr) == Expr && expr.head != :toplevel
|
if (term || disp) && (typeof(expr) != Expr || expr.head != :toplevel)
|
||||||
obj != nothing && display(obj)
|
obj != nothing && display(obj)
|
||||||
elseif typeof(expr) == Symbol
|
|
||||||
display(obj)
|
|
||||||
#This shows images and lone variables, result can
|
#This shows images and lone variables, result can
|
||||||
#Handle last line sepately
|
#Handle last line sepately
|
||||||
elseif lastline && obj != nothing
|
elseif lastline && obj != nothing
|
||||||
(expr.head != :toplevel) && display(obj)
|
(typeof(expr) != Expr || expr.head != :toplevel) && display(obj)
|
||||||
end
|
end
|
||||||
catch E
|
catch E
|
||||||
throw_errors && throw(E)
|
throw_errors && throw(E)
|
||||||
|
|
Loading…
Reference in New Issue