mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Include images in the Qt help qhp file, patch by Wouter van Heyst.
This commit is contained in:
parent
b4365ad72b
commit
cbadd4543a
@ -147,10 +147,12 @@ class QtHelpBuilder(StandaloneHTMLBuilder):
|
|||||||
outdir += os.sep
|
outdir += os.sep
|
||||||
olen = len(outdir)
|
olen = len(outdir)
|
||||||
projectfiles = []
|
projectfiles = []
|
||||||
|
staticdir = path.join(outdir, '_static')
|
||||||
|
imagesdir = path.join(outdir, '_images')
|
||||||
for root, dirs, files in os.walk(outdir):
|
for root, dirs, files in os.walk(outdir):
|
||||||
staticdir = (root == path.join(outdir, '_static'))
|
resourcedir = root.startswith(staticdir) or root.startswith(imagesdir)
|
||||||
for fn in files:
|
for fn in files:
|
||||||
if (staticdir and not fn.endswith('.js')) or \
|
if (resourcedir and not fn.endswith('.js')) or \
|
||||||
fn.endswith('.html'):
|
fn.endswith('.html'):
|
||||||
filename = path.join(root, fn)[olen:]
|
filename = path.join(root, fn)[olen:]
|
||||||
#filename = filename.replace(os.sep, '\\') # XXX
|
#filename = filename.replace(os.sep, '\\') # XXX
|
||||||
|
Loading…
Reference in New Issue
Block a user