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,
|
:fig_env=> nothing,
|
||||||
:out_width=> nothing,
|
:out_width=> nothing,
|
||||||
:out_height=> nothing,
|
:out_height=> nothing,
|
||||||
|
:skip=>false
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
#This one can be changed at runtime, initially a copy of defaults
|
#This one can be changed at runtime, initially a copy of defaults
|
||||||
|
|
|
@ -89,12 +89,15 @@ function convert_doc(doc::WeaveDoc, format::NotebookOutput)
|
||||||
end
|
end
|
||||||
|
|
||||||
for chunk in doc.chunks
|
for chunk in doc.chunks
|
||||||
|
|
||||||
if isa(chunk, DocChunk)
|
if isa(chunk, DocChunk)
|
||||||
push!(cells,
|
push!(cells,
|
||||||
Dict("cell_type" => "markdown",
|
Dict("cell_type" => "markdown",
|
||||||
"metadata" => Dict(),
|
"metadata" => Dict(),
|
||||||
"source" => [strip(join([repr(c) for c in chunk.content], ""))])
|
"source" => [strip(join([repr(c) for c in chunk.content], ""))])
|
||||||
)
|
)
|
||||||
|
elseif haskey(chunk.options, :skip) && chunk.options[:skip] == "notebook"
|
||||||
|
continue
|
||||||
else
|
else
|
||||||
push!(cells,
|
push!(cells,
|
||||||
Dict("cell_type" => "code",
|
Dict("cell_type" => "code",
|
||||||
|
|
Loading…
Reference in New Issue