Commits

Anonymous committed eddf607

fix html output spacing

Comments (0)

Files changed (1)

         if(0 == len(variables)):
                 return "<p>None</p>"
 
-        table = '${offset}<table>\n${offset}\t<thead>\n${offset}\t\t<tr>\n${offset}\t\t\t<th>Type</th>\n${offset}\t\t\t<th>Name</th>\n${offset}\t\t\t<th>Description</th>\n${offset}\t\t</tr>\n${offset}\t</thead>\n${offset}\t<tbody>${body}\n${offset}\t</tbody>\n${offset}</table>'
+        table = '<table>\n${offset}\t<thead>\n${offset}\t\t<tr>\n${offset}\t\t\t<th>Type</th>\n${offset}\t\t\t<th>Name</th>\n${offset}\t\t\t<th>Description</th>\n${offset}\t\t</tr>\n${offset}\t</thead>\n${offset}\t<tbody>${body}\n${offset}</tbody>\n${offset}</table>'
 
         tr = '\n${offset}<tr ${class}>\n${offset}\t<td>${type}</td>\n${offset}\t<td>${name}</td>\n${offset}\t<td>${desc}</td>\n${offset}</tr>'
 
-        row = {"offset":"\t\t\t\t"}
+        row = {"offset":"\t\t\t"}
         html = ""
         alt = False
         for item in variables :
                 html += Template(tr).safe_substitute(row)
                 alt = not alt
 
-        return Template(table).safe_substitute({"body":html, "offset":"\t\t\t"})
+        return Template(table).safe_substitute({"body":html, "offset":"\t\t"})
 
 def index_table(links, maxRowLen=5):
 
         heading_list = headings(procedure_names, '-', minSize)
 
         # for every namespace, create a top index link
-        index_buf = '\t\t<hr>\n\t\t<nav class="main">\n\t\t\t'
+        index_buf = '<hr>\n\t\t<nav class="main">\n\t\t\t'
         for heading in heading_list :
                 index_buf += Template('<a href="#${heading}">${heading}</a>').safe_substitute({"heading":heading})
 
                 for i in range(len(space)):
 
                         if (singleFile is True):
-                                proc_buf += Template('<a id="${anchor}"></a>').safe_substitute({"anchor":space[i]})
+                                proc_buf += Template('\t\t<a id="${anchor}"></a>').safe_substitute({"anchor":space[i]})
                                 proc_buf += procedure_body(pdb[space[i]])
 
                                 tmp = linker(heading)
-                                tmp["offset"] = "\n\t\t\t"
+                                tmp["offset"] = "\t\t"
                                 proc_buf += Template('${offset}<nav>\n${offset}\t<a href="#top" style="display:inline-block; margin-right:40px;">top</a><a href="${href}">namespace</a>\n${offset}</nav>\n').safe_substitute(tmp)
 
                         else:
-                                tmp = "\n\t\t\t<nav>\n"
+                                tmp = "\n\t\t<nav>\n\t\t\t"
                                 if(i > 0):
-                                        tmp += Template('\t\t\t\t<a href="${href}" style="float:left;">previous</a>').safe_substitute(proc_linker(space[i-1]))
+                                        tmp += Template('<a href="${href}" style="float:left;">previous</a>').safe_substitute(proc_linker(space[i-1]))
 
                                 tmp += '<a href="../index.html">index</a>'
 
                                 if(i < (len(space) - 1)):
                                         tmp += Template('<a href="${href}" style="float:right;">next</a>').safe_substitute(proc_linker(space[i+1]))
 
-                                tmp += "\n\t\t\t</nav>\n"
+                                tmp += "\n\t\t</nav>\n"
 
                                 proc_buf = tmp + procedure_body(pdb[space[i]]) + tmp
 
         with open(os.path.join(root,"index.html"), "w+") as f :
                 f.write(Template(__INDEX_HTML).safe_substitute({"date":now,"body":index_buf + proc_buf, "css":css}))
 
-
-
-
-
         return None
 
 register(