diff options
author | Maximillian Dornseif <md@hudora.de> | 2011-01-21 08:16:51 +0100 |
---|---|---|
committer | Maximillian Dornseif <md@hudora.de> | 2011-01-21 08:25:55 +0100 |
commit | 9360e5974a95206d3f8143a04569ac1294aa4f44 (patch) | |
tree | 3d3b433c305b24af5efeaf2f14bab8710b459ea6 | |
parent | 052ccc5c2c455a938ba97ad9e76e25c7b1c79283 (diff) | |
download | pycco-9360e5974a95206d3f8143a04569ac1294aa4f44.tar.gz |
Fix CSS path in multi-dir mode
-rw-r--r-- | pycco/main.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pycco/main.py b/pycco/main.py index 67efe41..21a33c2 100644 --- a/pycco/main.py +++ b/pycco/main.py @@ -230,14 +230,14 @@ def generate_html(source, sections, preserve_paths=True, outdir=None): raise TypeError("Missing the required 'outdir' keyword argument") title = path.basename(source) dest = destination(source, preserve_paths=preserve_paths, outdir=outdir) + csspath = path.relpath(path.join(outdir, "pycco.css"), path.split(dest)[0]) for sect in sections: sect["code_html"] = re.sub(r"\{\{", r"__DOUBLE_OPEN_STACHE__", sect["code_html"]) rendered = pycco_template({ "title" : title, - "stylesheet" : path.relpath(path.join(path.dirname(dest), "pycco.css"), - path.split(dest)[0]), + "stylesheet" : csspath, "sections" : sections, "source" : source, "path" : path, @@ -388,7 +388,7 @@ def process(sources, preserve_paths=True, outdir=None): pass with open(destination(s, preserve_paths=preserve_paths, outdir=outdir), "w") as f: - f.write(generate_documentation(s, outdir=outdir)) + f.write(generate_documentation(s, preserve_paths=preserve_paths, outdir=outdir)) print "pycco = %s -> %s" % (s, dest) |