HTML code support
When generating html using weave from jmd files, It would be useful if the entered HTML code is processed the same way it is processed in normal Markdown.
For example:
<img src="https://raw.githubusercontent.com/JuliaComputing/JuliaAcademyData.jl/master/courses/Deep%20learning%20with%20Flux/data/single-neuron.png" alt="Drawing" style="width: 500px;"/>
should give:

Now if we try this
$$<img src="https://raw.githubusercontent.com/JuliaComputing/JuliaAcademyData.jl/master/courses/Deep%20learning%20with%20Flux/data/single-neuron.png" alt="Drawing" style="width: 500px;"/>$$
An image with \[ and \] around it appears
In Documenter @raw html can be used
I think we can do something like:
julia; echo=false
url = "https://raw.githubusercontent.com/JuliaComputing/JuliaAcademyData.jl/master/courses/Deep%20learning%20with%20Flux/data/single-neuron.png"
display("text/html", "<img src=$url alt='Drawing' style='width: 500px;'/>");
Could adding something like
Base.display(report::Weave.Report, m::MIME"text/html", data::HTML) =
report.rich_output *= string('\n', data.content)
work? I've added it into some scripts with the desired outcome. Of course, it only works in HTML output documents.
Base.display(::Weave.Report, ...) is only called for chunk outputs, as for markdown parts, we translate them into HTML by using Markdown stdlib.
How about placing something like this in a code block with echo=false
url = "https://raw.githubusercontent.com/JuliaComputing/JuliaAcademyData.jl/master/courses/Deep%20learning%20with%20Flux/data/single-neuron.png"
display(Markdown.parse(""))
This is a way to include dynamic content into a otherwise static report. For example, I use a weave report to summarize each of over 100 items in a database. (>100 distinct reports generated using one weave document) I've like to include some of the database content in headers so I do something like
display(Markdown.parse("## $name: $item"))
It also allows you to write loops with headers,captions or comments or other in a weave report:
for i, caption in enumerate([ "fish", "fowl" ,"feline", "feast" ])
display(Markdown.parse("## Plot number $i"))
display(plotit(i))
display(Markdown.parse("Figure $i: $caption")
end
While I've only tested this with HTML output, presumably, since it uses Markdown, it should work with the other output formats.