Skip to content

Commit e67e124

Browse files
author
Christopher Doris
committed
split out Utils
1 parent f40e78d commit e67e124

File tree

9 files changed

+313
-312
lines changed

9 files changed

+313
-312
lines changed

src/PythonCall.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Base.@kwdef mutable struct Config
1212
auto_fix_qt_plugin_path::Bool = true
1313
end
1414

15-
include("Utils.jl")
15+
include("Utils/Utils.jl")
1616
include("C/C.jl")
1717
include("GIL.jl")
1818
include("GC.jl")

src/Utils.jl

Lines changed: 0 additions & 311 deletions
This file was deleted.

src/Utils/ExtraNewline.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
ExtraNewline(x)
3+
4+
An object that displays the same as `x` but with an extra newline in text/plain.
5+
"""
6+
struct ExtraNewline{T}
7+
value::T
8+
end
9+
Base.show(io::IO, m::MIME, x::ExtraNewline) = show(io, m, x.value)
10+
Base.show(io::IO, m::MIME"text/csv", x::ExtraNewline) = show(io, m, x.value)
11+
Base.show(io::IO, m::MIME"text/tab-separated-values", x::ExtraNewline) =
12+
show(io, m, x.value)
13+
Base.show(io::IO, m::MIME"text/plain", x::ExtraNewline) =
14+
(show(io, m, x.value); println(io))
15+
Base.showable(m::MIME, x::ExtraNewline) = showable(m, x.value)

0 commit comments

Comments
 (0)