示例#1
0
    def test_RSTRenderer(self):
        pub = parse_rest(TEXT)

        renderer = text.RSTRenderer()
        renderer.process(pub.writer.document)

        import logging
        logging.debug('%s', repr(renderer.output))
        logging.debug('\n%s', renderer.flat())

        self.assertEqual(TEXT_rendered, renderer.output)
示例#2
0
def rest_chunks(input):
    renderer = text.RSTRenderer()
    renderer.process(parse_rest(input).writer.document)

    return renderer.output
示例#3
0
def rest_flat(input):
    renderer = text.RSTRenderer()
    renderer.process(parse_rest(input).writer.document)

    return renderer.flat()