mirror of https://github.com/mpastell/Weave.jl
rename writer.jl -> converter.jl
parent
094ebea6cf
commit
42115e7d52
|
@ -305,7 +305,7 @@ include("cache.jl")
|
|||
include("formatters.jl")
|
||||
include("format.jl")
|
||||
include("pandoc.jl")
|
||||
include("writers.jl")
|
||||
include("converter.jl")
|
||||
|
||||
export weave,
|
||||
list_out_formats,
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using Weave
|
||||
using Weave, Test
|
||||
using Weave: run_doc
|
||||
using Test
|
||||
|
||||
|
||||
# TODO: add test for header processsing
|
||||
|
@ -27,8 +26,8 @@ mock_doc(str, chunk_parser = Weave.parse_markdown) = Weave.WeaveDoc("dummy", chu
|
|||
include("test_error_rendering.jl")
|
||||
end
|
||||
|
||||
@testset "Conversions" begin
|
||||
include("convert_test.jl")
|
||||
@testset "convertions" begin
|
||||
include("test_converter.jl")
|
||||
end
|
||||
|
||||
@testset "Formatters" begin
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using Weave
|
||||
using Test
|
||||
# TODO: refactor
|
||||
|
||||
function convert_test(outfile, infile="documents/chunk_options.noweb")
|
||||
outfile = joinpath("documents/convert", outfile)
|
||||
|
@ -16,17 +15,9 @@ convert_test("chunk_options.mdw")
|
|||
convert_test("chunk_options_nb.mdw", "documents/chunk_options.ipynb")
|
||||
|
||||
# Separate test for notebook (output depends on julia version)
|
||||
function contents(chunk::Weave.DocChunk)
|
||||
return join([strip(c.content) for c in chunk.content], "")
|
||||
end
|
||||
|
||||
function contents(chunk::Weave.CodeChunk)
|
||||
return chunk.content
|
||||
end
|
||||
|
||||
function contents(doc::Weave.WeaveDoc)
|
||||
return join([contents(chunk) for chunk in doc.chunks], "")
|
||||
end
|
||||
contents(chunk::Weave.DocChunk) = join([strip(c.content) for c in chunk.content], "")
|
||||
contents(chunk::Weave.CodeChunk) = chunk.content
|
||||
contents(doc::Weave.WeaveDoc) = join([contents(chunk) for chunk in doc.chunks], "")
|
||||
|
||||
outfile = "documents/convert/chunk_options.ipynb"
|
||||
infile = "documents/chunk_options.noweb"
|
Loading…
Reference in New Issue