Job.build_html(): When formatting HTML into more than one HTML page, and
not doing the \label{foo} --> foo.html transformation (--numeric was specified on the command line), still look to see if there is an "About this document..." node and copy that to "about.html", since the page footers use that as the target.
This commit is contained in:
parent
e3955a8ce2
commit
cfef0096f9
|
@ -368,7 +368,25 @@ class Job:
|
|||
os.path.join(builddir, self.doc + ".css"))
|
||||
shutil.copyfile(os.path.join(builddir, self.doc + ".html"),
|
||||
os.path.join(builddir, "index.html"))
|
||||
if max_split_depth != 1 and not self.options.numeric:
|
||||
if max_split_depth != 1:
|
||||
if self.options.numeric:
|
||||
label_file = os.path.join(builddir, "labels.pl")
|
||||
fp = open(label_file)
|
||||
about_node = None
|
||||
target = " = q/about/;\n"
|
||||
x = len(target)
|
||||
while 1:
|
||||
line = fp.readline()
|
||||
if not line:
|
||||
break
|
||||
if line[-x:] == target:
|
||||
line = fp.readline()
|
||||
m = re.search(r"\|(node\d+\.[a-z]+)\|", line)
|
||||
about_node = m.group(1)
|
||||
shutil.copyfile(os.path.join(builddir, about_node),
|
||||
os.path.join(builddir, "about.html"))
|
||||
break
|
||||
else:
|
||||
pwd = os.getcwd()
|
||||
try:
|
||||
os.chdir(builddir)
|
||||
|
|
Loading…
Reference in New Issue