doesn't get confused (bless it!)
* Make expected output match actual output, unittest now passes
self.item = u''
self.inul = True
self.text = self.text + "\n"
self.item = u''
self.inul = True
self.text = self.text + "\n"
- elif tag.lower() == "li" and self.inul:
+ elif tag.lower() == "li":
if not self.initem:
self.initem = True
self.item = u''
if not self.initem:
self.initem = True
self.item = u''
textwrap.wrap(self.item, 67)]) \
+ u'\n'
self.item = u''
textwrap.wrap(self.item, 67)]) \
+ u'\n'
self.item = u''
def handle_startendtag(self, tag, attrs):
if tag.lower() == "br":
def handle_startendtag(self, tag, attrs):
if tag.lower() == "br":
self.inpre = False
elif tag.lower() == "li":
self.initem = False
self.inpre = False
elif tag.lower() == "li":
self.initem = False
self.text = self.text \
+ u' * ' \
+ u'\n '.join( \
self.text = self.text \
+ u' * ' \
+ u'\n '.join( \
self.blockquote = self.blockquote \
+ unicode(data, "utf-8").strip() \
+ u' '
self.blockquote = self.blockquote \
+ unicode(data, "utf-8").strip() \
+ u' '
+ elif self.initem:
+ self.item = self.item + unicode(data, "utf-8")
elif self.inparagraph:
self.currentparagraph = self.currentparagraph \
+ unicode(data, "utf-8").strip() \
+ u' '
elif self.inparagraph:
self.currentparagraph = self.currentparagraph \
+ unicode(data, "utf-8").strip() \
+ u' '
- elif self.inul and self.initem:
- self.item = self.item + unicode(data, "utf-8")
elif self.inpre:
self.text = self.text + unicode(data, "utf-8")
else:
elif self.inpre:
self.text = self.text + unicode(data, "utf-8")
else:
- * This is an item
- * And a second
- * And a third
+
+ * This is an item
+ * And a second
+ * And a third