diff --git a/Project.toml b/Project.toml index c135fa6..047879b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "AbstractPlutoDingetjes" uuid = "6e696c72-6542-2067-7265-42206c756150" authors = ["Paul Berg ", "Fons van der Plas "] -version = "1.1.2" +version = "1.1.3" [deps] Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" diff --git a/src/AbstractPlutoDingetjes.jl b/src/AbstractPlutoDingetjes.jl index 8ce5cc3..09f350c 100644 --- a/src/AbstractPlutoDingetjes.jl +++ b/src/AbstractPlutoDingetjes.jl @@ -55,12 +55,13 @@ end See also: [`is_inside_pluto`](@ref). """ -is_supported_by_display(io::IO, x::Any) = if !_loaded_ref[] - error("`is_supported_by_display` can only be called inside a function, **after** your package has been imported. You can not call the function at top-level.") -else - features = get(io, :pluto_supported_integration_features, []) - x ∈ features -end +is_supported_by_display(io::IO, x::Any) = + if !_loaded_ref[] + error("`is_supported_by_display` can only be called inside a function, **after** your package has been imported. You can not call the function at top-level.") + else + features = get(io, :pluto_supported_integration_features, []) + x ∈ features + end """ @@ -70,11 +71,12 @@ is_inside_pluto()::Bool Are we running inside a Pluto notebook? """ -is_inside_pluto()::Bool = if !_loaded_ref[] - error("`is_inside_pluto` can only be called inside a function, **after** your package has been imported. You can not call the function at top-level.") -else - isdefined(Main, :PlutoRunner) -end +is_inside_pluto()::Bool = + if !_loaded_ref[] + error("`is_inside_pluto` can only be called inside a function, **after** your package has been imported. You can not call the function at top-level.") + else + isdefined(Main, :PlutoRunner) + end """ ```julia is_inside_pluto(io::IO)::Bool @@ -84,11 +86,12 @@ Are we rendering inside a Pluto notebook? This function should be used inside a `Base.show` method, and the first argument should be the `io` provided to the `Base.show` method. """ -is_inside_pluto(io::IO)::Bool = if !_loaded_ref[] - error("`is_inside_pluto` can only be called inside a function, **after** your package has been imported. You can not call the function at top-level.") -else - get(io, :is_pluto, false) -end +is_inside_pluto(io::IO)::Bool = + if !_loaded_ref[] + error("`is_inside_pluto` can only be called inside a function, **after** your package has been imported. You can not call the function at top-level.") + else + get(io, :is_pluto, false) + end module Bonds @@ -114,7 +117,7 @@ Base.show(io::IO, m::MIME"text/html", s::MySlider) = show(io, m, HTML("