Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def parse(self, inputstring, document):
self.setup_parse(inputstring, document)
self.document = document
self.current_node = document
self.section_handler = _SectionHandler(document)
parser = Parser()
ast = parser.parse(inputstring + '\n')
self.convert_block(ast)
self.finish_parse()