Merge pull request #347 from JunoLab/avi/pandochighlight

fix no highlight style error on pandoc2(html|pdf) output
pull/349/head
Shuhei Kadowaki 2020-05-24 18:16:17 +09:00 committed by GitHub
commit 9b55d7e924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -13,7 +13,7 @@ function format(doc, template = nothing, highlight_theme = nothing; css = nothin
get!(docformat.formatdict, :out_height, nothing)
get!(docformat.formatdict, :fig_pos, nothing)
get!(docformat.formatdict, :fig_env, nothing)
docformat.formatdict[:highlight_theme] = highlight_theme = get_highlight_theme(highlight_theme)
docformat.formatdict[:highlight_theme] = get_highlight_theme(highlight_theme)
restore_header!(doc)
@ -65,6 +65,8 @@ get_stylesheet(::Nothing) = get_stylesheet(normpath(STYLESHEET_DIR, "skeleton.cs
get_stylesheet(path::AbstractString) = read(path, String)
get_highlight_stylesheet(mime, highlight_theme) =
get_highlight_stylesheet(mime, get_highlight_theme(highlight_theme))
get_highlight_stylesheet(mime, highlight_theme::Type{<:Highlights.AbstractTheme}) =
sprint((io, x) -> Highlights.stylesheet(io, mime, x), highlight_theme)
const WEAVE_VERSION = try