mirror of https://github.com/mpastell/Weave.jl
Add option to skip chunks in notebook
parent
bad5650027
commit
056db5141a
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue