|
|
|
@ -552,8 +552,8 @@ function containsYAML(chunk) |
|
|
|
if startswith(strip(line.first * line.second), "!!! carp") |
|
|
|
if startswith(strip(line.first * line.second), "!!! carp") |
|
|
|
return true |
|
|
|
return true |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
#??? |
|
|
|
return false |
|
|
|
return false |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
function chunkToMD(chunk) |
|
|
|
function chunkToMD(chunk) |
|
|
|
@ -677,9 +677,10 @@ function markdown(inputfile, outputdir=pwd(); config::AbstractDict=Dict(), kwarg |
|
|
|
sb = sandbox() |
|
|
|
sb = sandbox() |
|
|
|
iomd = IOBuffer() |
|
|
|
iomd = IOBuffer() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if flavor isa CarpentriesFlavor |
|
|
|
for chunk in chunks |
|
|
|
for chunk in chunks |
|
|
|
io = IOBuffer() |
|
|
|
io = IOBuffer() |
|
|
|
if flavor isa CarpentriesFlavor |
|
|
|
|
|
|
|
if isa(chunk, MDChunk) |
|
|
|
if isa(chunk, MDChunk) |
|
|
|
if containsAdmonition(chunk) |
|
|
|
if containsAdmonition(chunk) |
|
|
|
|
|
|
|
|
|
|
|
@ -728,6 +729,7 @@ function markdown(inputfile, outputdir=pwd(); config::AbstractDict=Dict(), kwarg |
|
|
|
) |
|
|
|
) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
else |
|
|
|
else |
|
|
|
# Vanilla Function |
|
|
|
# Vanilla Function |
|
|
|
for (chunknum, chunk) in enumerate(chunks) |
|
|
|
for (chunknum, chunk) in enumerate(chunks) |
|
|
|
@ -788,7 +790,7 @@ function markdown(inputfile, outputdir=pwd(); config::AbstractDict=Dict(), kwarg |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
write(iomd, '\n') # add a newline between each chunk |
|
|
|
write(iomd, '\n') # add a newline between each chunk |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# custom post-processing from user |
|
|
|
# custom post-processing from user |
|
|
|
content = config["postprocess"](String(take!(iomd))) |
|
|
|
content = config["postprocess"](String(take!(iomd))) |
|
|
|
|