mirror of https://github.com/mpastell/Weave.jl
Only strip header from md2* formats, fix pandoc2html
parent
bbad66d0b8
commit
38d3b04363
|
@ -4,7 +4,6 @@ function format(doc::WeaveDoc)
|
|||
formatted = AbstractString[]
|
||||
docformat = doc.format
|
||||
|
||||
|
||||
#Complete format dictionaries with defaults
|
||||
formatdict = docformat.formatdict
|
||||
get!(formatdict, :termstart, formatdict[:codestart])
|
||||
|
@ -19,7 +18,9 @@ function format(doc::WeaveDoc)
|
|||
|
||||
#strip header
|
||||
if isa(doc.chunks[1], DocChunk)
|
||||
doc.chunks[1] = strip_header(doc.chunks[1])
|
||||
if contains(doc.doctype, "md2")
|
||||
doc.chunks[1] = strip_header(doc.chunks[1])
|
||||
end
|
||||
end
|
||||
|
||||
for chunk in copy(doc.chunks)
|
||||
|
|
|
@ -63,9 +63,9 @@ const pdoc2html = Pandoc("Markdown to HTML (requires Pandoc)",
|
|||
:codeend=> "````\n\n",
|
||||
:outputstart=> "````",
|
||||
:outputend=> "````\n\n",
|
||||
:fig_ext=> ".svg",
|
||||
:fig_ext=> ".png",
|
||||
:extension=> "md",
|
||||
:mimetypes => ["image/svg+xml", "image/png", "image/jpg",
|
||||
:mimetypes => ["image/png", "image/svg+xml", "image/jpg",
|
||||
"text/html", "text/markdown", "text/plain"],
|
||||
:doctype=> "md2html"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue