From: David F. <dav...@us...> - 2004-08-27 10:26:14
|
Update of /cvsroot/translate/src/translate/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31975 Modified Files: html.py Log Message: added code to include untagged data in the blogs if desired added li as a valid marking tag Index: html.py =================================================================== RCS file: /cvsroot/translate/src/translate/storage/html.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- html.py 27 Aug 2004 09:41:25 -0000 1.1 +++ html.py 27 Aug 2004 10:26:04 -0000 1.2 @@ -25,13 +25,14 @@ class POHTMLParser(HTMLParser): - markingtags = ["p", "title", "h1", "h2", "h3", "td", "div"] + markingtags = ["p", "title", "h1", "h2", "h3", "td", "div", "li"] markingattrs = ["lang"] includeattrs = ["alt"] - def __init__(self): + def __init__(self, includeuntaggeddata): self.blocks = [] self.currentblock = "" self.currenttag = None + self.includeuntaggeddata = includeuntaggeddata HTMLParser.__init__(self) def startblock(self, tag): @@ -76,4 +77,7 @@ def handle_data(self, data): if self.currenttag is not None: self.currentblock += data + elif self.includeuntaggeddata: + self.startblock(None) + self.currentblock += data |