Merge pull request #35 from jarvist/master

Add check for Pluto.jl interactive notebook.
This commit is contained in:
gcalderone 2020-10-04 23:55:14 +02:00 committed by GitHub
commit 03953c0ad6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -236,11 +236,12 @@ const sessions = OrderedDict{Symbol, Session}()
const options = Options()
function __init__()
# Check whether we are running in a IJulia or Juno session.
# Check whether we are running in an IJulia, Juno or Pluto session.
# (copied from Gaston.jl).
options.gpviewer = !(
((isdefined(Main, :IJulia) && Main.IJulia.inited) ||
(isdefined(Main, :Juno) && Main.Juno.isactive()))
(isdefined(Main, :Juno) && Main.Juno.isactive()) ||
(isdefined(Main, :PlutoRunner)) )
)
end