[Zope-CVS] CVS: Products/ZCTextIndex - HTMLSplitter.py:1.1.2.2
Jeremy Hylton
jeremy@zope.com
Fri, 10 May 2002 10:32:02 -0400
Update of /cvs-repository/Products/ZCTextIndex
In directory cvs.zope.org:/tmp/cvs-serv9020
Modified Files:
Tag: TextIndexDS9-branch
HTMLSplitter.py
Log Message:
Make the HTMLSplitter honor the actual splitter interface.
=== Products/ZCTextIndex/HTMLSplitter.py 1.1.2.1 => 1.1.2.2 ===
def process(self, text):
- text = text[0] # XXX
+ splat = []
+ for t in text:
+ splat += self.split(t)
+ return splat
+
+ def split(self, text):
text = text.lower()
remove = ["<[^>]*>",
"&[A-Za-z]+;",
@@ -33,4 +38,4 @@
buf = f.read()
f.close()
print path
- print splitter.process(buf)
+ print splitter.process([buf])