Browse Source

Remove empty cells after afmonitions

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

22
src/Literate.jl

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

Loading…
Cancel
Save