When working in IJulia I find myself using this code:
struct HtmlString
s::String
end
Base.show(io::IO, ::MIME"text/html", s::HtmlString) =
print(io, s.s)
HtmlString("Result: <b>123.4</b")
I can then easily output tables of results as HTML etc. I can build up functions that return lumps of HTML for reports that appear inline in the notebook.
This feels fundamental - is there an HTML string type elsewhere that I’m missing please?
We have LatexStrings.jl, perhaps we should have HtmlStrings.jl?
Perhaps I’m missing a more idiomatic approach? Any wisdom appreciated please.