Source

psilib / htmlutils.py

Diff from to

htmlutils.py

 from xml.sax.saxutils import escape, _outputwrapper, writetext, writeattr
 
 
-class HTMLformat(xml.sax.ContentHandler):
+class SaxHash(xml.sax.ContentHandler):
 
     from htmldefs import inline, empty, head
     
         else: self.content.append(content)
 
 
-def listhtml(html):
+def htmlhash(html):
     from xml.sax.handler import feature_external_ges
     parser = xml.sax.make_parser()
-    h = HTMLformat()
+    h = SaxHash()
     parser.setFeature(feature_external_ges, 0)
     parser.setContentHandler(h)
     source = xml.sax.InputSource(None)
 def htmlprep(file):
     html = htmldom(file)
     widthtags = list(tagsinList(html, tagsWithAttribute('width')))
-    grid = makegrid(html, widthtags)
-    fixwidths(grid)
+    fixwidths(htmlgrid(html, widthtags))
     fixspans(html)
     notrwidth(html)
     return html
 
 def htmlines(file):
-    return listhtml(tostring(htmlprep(file)))
+    return htmlhash(tostring(htmlprep(file)))
 
 def tagsWithAttribute(attr):
     from htmldefs import html2css
     return [i for i in html2css if attr in html2css.get(i)]
 
-def makegrid(doc, structure):
+def htmlgrid(doc, structure):
     grid, temp, blist = [], [], []
     for node in structure:
         if isname(node, 'tr'):