+ elif tag_thats_done == u'dt':
+ definition = unicode(" ".join( \
+ self.curdata.encode("utf-8").strip().split()), \
+ "utf-8")
+ if len(self.text) > 0 and self.text[-1] != u'\n':
+ self.text = self.text + u'\n\n'
+ elif len(self.text) > 1 and self.text[-2] != u'\n':
+ self.text = self.text + u'\n'
+ definition = u' ' * (self.indentlevel - 4) + definition + "::"
+ indentstring = u'\n' + u' ' * (self.indentlevel - 3)
+ self.text = self.text \
+ + indentstring.join(
+ textwrap.wrap(definition, \
+ self.textwidth - self.indentlevel - 4))
+ self.curdata = u''
+ elif tag_thats_done == u'dd':
+ definition = unicode(" ".join( \
+ self.curdata.encode("utf-8").strip().split()),
+ "utf-8")
+ if len(definition) > 0:
+ if len(self.text) > 0 and self.text[-1] != u'\n':
+ self.text = self.text + u'\n'
+ indentstring = u'\n' + u' ' * self.indentlevel
+ self.text = self.text \
+ + indentstring \
+ + indentstring.join( \
+ textwrap.wrap( \
+ definition, \
+ self.textwidth - self.indentlevel \
+ ) \
+ )
+ self.curdata = u''
+ elif tag_thats_done == u'a':
+ self.curdata = self.curdata + u'`__'
+ pass