No need to patch latex writer in 0.6

pull/71/merge v0.4.0
Matti Pastell 2017-01-04 19:56:28 +02:00
parent f1b42156e1
commit 6c2f0a7bb5
1 changed files with 21 additions and 19 deletions

View File

@ -131,25 +131,27 @@ function format_chunk(chunk::DocChunk, formatdict, docformat::JMarkdown2HTML)
return string(Documenter.Writers.HTMLWriter.mdconvert(m))
end
if VERSION < v"v0.6.0-362b271"
#Fixes to Base latex writer
function Base.Markdown.latex(io::IO, md::Base.Markdown.Paragraph)
function Base.Markdown.latex(io::IO, md::Base.Markdown.Paragraph)
println(io)
for md in md.content
Base.Markdown.latexinline(io, md)
end
println(io)
end
end
function wrapverb(f, io, cmd)
function wrapverb(f, io, cmd)
print(io, "\\", cmd, "|")
f()
print(io, "|")
end
end
function Base.Markdown.latexinline(io::IO, code::Base.Markdown.Code)
function Base.Markdown.latexinline(io::IO, code::Base.Markdown.Code)
wrapverb(io, "verb") do
print(io, code.code)
end
end
end