def parse_text(directive, text, node_type=nodes.paragraph, where=None):
 assert (text is not None), ('Missing text during parse_text in %s' % where)
 vl = ViewList()
 for line in text.split('\n'):
  vl.append(line, line)
 node = node_type(rawsource=text)
 directive.state.nested_parse(vl, 0, node)
 return node

def parse_text ( directive , text , node_type = nodes . paragraph , where = None ) : assert ( text is not None ) , ( 'Missing text during parse_text in %s' % where ) vl = ViewList ( ) for line in text . split ( '\n' ) : vl . append ( line , line ) node = node_type ( rawsource = text ) directive . state . nested_parse ( vl , 0 , node ) return node
parses text in rest format and returns a node with the content .