type annotate API

pull/350/head
Shuhei Kadowaki 2020-06-02 19:03:30 +09:00
parent aa7fd311d8
commit 533667b9ad
2 changed files with 3 additions and 5 deletions

View File

@ -138,7 +138,7 @@ end
should_render(chunk) = chunk.options[:echo] && chunk.options[:results] "hidden"
render_doc(docformat, body, args...) = body
render_doc(docformat, body, doc) = body
# utilities
# ---------

View File

@ -16,16 +16,14 @@ register_format!(_, format) = error("Format needs to be a subtype of WeaveFormat
set_rendering_options!(doc; kwargs...) = set_rendering_options!(doc.format; kwargs...)
function render_doc(doc)
docformat = doc.format
function render_doc(doc::WeaveDoc)
restore_header!(doc)
docformat = doc.format
lines = map(copy(doc.chunks)) do chunk
format_chunk(chunk, docformat)
end
body = join(lines, '\n')
return render_doc(docformat, body, doc)
end