mirror of https://github.com/mpastell/Weave.jl
make Weave.path really path
parent
8515c0dcde
commit
cdd653e028
|
@ -304,7 +304,7 @@ function include_weave(
|
|||
)
|
||||
old_path = pwd()
|
||||
doc = WeaveDoc(source, informat)
|
||||
cd(doc.path)
|
||||
cd(dirname(doc.path))
|
||||
try
|
||||
code = join(
|
||||
[x.content for x in filter(x -> isa(x, Weave.CodeChunk), doc.chunks)],
|
||||
|
|
|
@ -2,7 +2,8 @@ using YAML
|
|||
|
||||
|
||||
function WeaveDoc(source, informat = nothing)
|
||||
path, fname = splitdir(abspath(source))
|
||||
path = abspath(source)
|
||||
_, fname = splitdir(path)
|
||||
basename = splitext(fname)[1]
|
||||
|
||||
isnothing(informat) && (informat = detect_informat(source))
|
||||
|
|
|
@ -320,7 +320,7 @@ end
|
|||
function get_cwd(doc::WeaveDoc, out_path)
|
||||
# Set the output directory
|
||||
if out_path === :doc
|
||||
cwd = doc.path
|
||||
cwd = dirname(doc.path)
|
||||
elseif out_path === :pwd
|
||||
cwd = pwd()
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue