Skip to content

pretty_tables should return object that is showable as "text/html" #130

@clarkevans

Description

@clarkevans

By default, if a pretty_table is rendered using HTML mode, it should probably return an object showable("text/html", ... ) that is, implementing Base.show(io::IO, m::MIME"text/html", ... ).

julia> x = pretty_table(String, rand(2,2); backend=:html, standalone=false);

julia> display("text/html", x)
ERROR: MethodError: no method matching show(::Base.TTY, ::MIME{Symbol("text/html")}, ::String)

julia> typeof(x)
String

Perhaps pretty_table(HTML, table) should do this?

julia> x = pretty_table(HTML, rand(2,2); standalone=false);
ERROR: The type UnionAll is not supported.

This topic came up as JuliaPluto/HypertextLiteral.jl#11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions