Esempio n. 1
0
    def createToken(self, info, parent):
        content = []
        for line in info['quote'].rstrip('\n').split('\n'):
            if line == u'>':
                content.append('')
            elif line.startswith(u'> '):
                content.append(line[2:])
            else:
                raise Exception(repr(line))

        #TODO: error check that all lines begin with '> '
        quote = tokens.Quote(parent)
        self.reader.parse(quote, '\n'.join(content))
        return quote
Esempio n. 2
0
 def testQuote(self):
     tokens.Quote()