def doctest(self, match, context, next_state):
data = '\n'.join(self.state_machine.get_text_block())
# TODO: prepend class value ['pycon'] (Python Console)
# parse with `directives.body.CodeBlock` (returns literal-block
# with class "code" and syntax highlight markup).
self.parent += nodes.doctest_block(data, data)
return [], next_state, []
评论列表
文章目录