Add option to skip chunks in notebook

pull/185/merge
Matti Pastell 2019-02-27 10:15:56 +02:00
parent bad5650027
commit 056db5141a
2 changed files with 4 additions and 0 deletions

View File

@ -34,6 +34,7 @@ const defaultParams =
:fig_env=> nothing,
:out_width=> nothing,
:out_height=> nothing,
:skip=>false
)
)
#This one can be changed at runtime, initially a copy of defaults

View File

@ -89,12 +89,15 @@ function convert_doc(doc::WeaveDoc, format::NotebookOutput)
end
for chunk in doc.chunks
if isa(chunk, DocChunk)
push!(cells,
Dict("cell_type" => "markdown",
"metadata" => Dict(),
"source" => [strip(join([repr(c) for c in chunk.content], ""))])
)
elseif haskey(chunk.options, :skip) && chunk.options[:skip] == "notebook"
continue
else
push!(cells,
Dict("cell_type" => "code",