Browse Source

Remove empty cells after afmonitions

pull/214/head
Sogari 3 years ago committed by Simon Christ
parent
commit
6db69f97dd
  1. 14
      src/Literate.jl

14
src/Literate.jl

@ -1036,8 +1036,15 @@ function create_notebook(flavor::PlutoFlavor, chunks, config) @@ -1036,8 +1036,15 @@ function create_notebook(flavor::PlutoFlavor, chunks, config)
write(io, line.second, '\n') # Skip indent
end
write(io, "\"\"\"\n")
end
content = String(take!(io))
uuid = uuid4(content, cellCounter)
cellCounter += 1
push!(uuids, uuid)
push!(folds, fold)
print(ionb, "# ╔═╡ ", uuid, '\n')
write(ionb, content, '\n')
end
else # isa(chunk, CodeChunk)
for line in chunk.lines
write(io, line, '\n')
@ -1056,8 +1063,6 @@ function create_notebook(flavor::PlutoFlavor, chunks, config) @@ -1056,8 +1063,6 @@ function create_notebook(flavor::PlutoFlavor, chunks, config)
foreach(l -> print(io, " ", l, '\n'), eachline(IOBuffer(content)))
print(io, "end\n")
content = String(take!(io))
end
end
uuid = uuid4(content, cellCounter)
cellCounter += 1
push!(uuids, uuid)
@ -1065,6 +1070,9 @@ function create_notebook(flavor::PlutoFlavor, chunks, config) @@ -1065,6 +1070,9 @@ function create_notebook(flavor::PlutoFlavor, chunks, config)
print(ionb, "# ╔═╡ ", uuid, '\n')
write(ionb, content, '\n')
end
end
end
for (i, uuid) in enumerate(singleChoiceUuids)
content = singleChoiceContent[i]

Loading…
Cancel
Save