diff options
author | Georg Brandl <georg@python.org> | 2008-05-03 20:45:43 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-05-03 20:45:43 +0000 |
commit | 9b5566dddbc4f09a615a46cc174bcfe6c0375ae4 (patch) | |
tree | d803af7efb86d54d4968d5f0bf1b0d6f03b4f5f0 /sphinx/htmlhelp.py | |
parent | 78812d8e7cc17d2b867b6ecd0d4b0d94751cfb26 (diff) | |
download | sphinx-git-9b5566dddbc4f09a615a46cc174bcfe6c0375ae4.tar.gz |
Remove unused files from the HTML help build.
Diffstat (limited to 'sphinx/htmlhelp.py')
-rw-r--r-- | sphinx/htmlhelp.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/htmlhelp.py b/sphinx/htmlhelp.py index dfdba9c68..05bc851e1 100644 --- a/sphinx/htmlhelp.py +++ b/sphinx/htmlhelp.py @@ -135,9 +135,10 @@ def build_hhx(builder, outdir, outname): outdir += os.sep olen = len(outdir) for root, dirs, files in os.walk(outdir): + staticdir = (root == path.join(outdir, '_static')) for fn in files: - if fn.endswith('.html') or fn.endswith('.css') or fn.endswith('.js'): - print >>f, path.join(root, fn)[olen:].replace('/', '\\') + if (staticdir and not fn.endswith('.js')) or fn.endswith('.html'): + print >>f, path.join(root, fn)[olen:].replace(os.sep, '\\') finally: f.close() |