+ self.text = self.text \
+ + u'\n\n' \
+ + self.headingtext.encode("utf-8") \
+ + u'\n' \
+ + u'~' * len(self.headingtext.encode("utf-8").strip())
+ self.headingtext = u''
+ elif tag.lower() == "p":
+ self.text = self.text \
+ + u'\n'.join(textwrap.wrap( \
+ self.currentparagraph, 70) \
+ )
+ self.inparagraph = False
+ self.currentparagraph = u''
+ elif tag.lower() == "blockquote":
+ self.text = self.text \
+ + u'\n> ' \
+ + u'\n> '.join( \
+ [a.strip() for a in textwrap.wrap(self.blockquote, 68)] \
+ ).encode("utf-8") \
+ + u'\n'
+ self.inblockquote = False
+ self.blockquote = u''
+ elif tag.lower() == "pre":
+ self.inpre = False
+ elif tag.lower() == "li":
+ self.initem = False
+ if self.item != "":
+ self.text = self.text \
+ + u' * ' \
+ + u'\n '.join( \
+ [a.strip() for a in textwrap.wrap(self.item, 67)]) \
+ + u'\n'
+ self.item = u''
+ elif tag.lower() == "ul":
+ self.inul = False