resolve CSS theme path relative to a target document when given in YAML

pull/334/head
Shuhei Kadowaki 2020-05-17 10:29:01 +09:00
parent cec388e94f
commit 87ba87d2d1
1 changed files with 6 additions and 3 deletions

View File

@ -132,7 +132,7 @@ function weave(
if out_path == ":doc" || out_path == ":pwd"
Symbol(out_path)
else
joinpath(dirname(source), out_path)
normpath(dirname(source), out_path)
end
end
end
@ -145,10 +145,13 @@ function weave(
throw_errors = get(weave_options, "throw_errors", throw_errors)
if haskey(weave_options, "template")
template = weave_options["template"]
template isa AbstractString && (template = joinpath(dirname(source), template))
template isa AbstractString && (template = normpath(dirname(source), template))
end
if haskey(weave_options, "css")
css = weave_options["css"]
css isa AbstractString && (css = normpath(dirname(source), css))
end
highlight_theme = get(weave_options, "highlight_theme", highlight_theme)
css = get(weave_options, "css", css)
pandoc_options = get(weave_options, "pandoc_options", pandoc_options)
latex_cmd = get(weave_options, "latex_cmd", latex_cmd)
latex_keep_unicode = get(weave_options, "latex_cmd", latex_keep_unicode)