def parse_(rst): document = new_document() parser = RstParser() parser.parse(rst, document) SmartQuotes(document, startnode=None).apply() for msg in document.traverse(nodes.system_message): if msg['level'] == 1: msg.replace_self([]) return document
def parse_(rst): document = utils.new_document(b'test data', settings) document['file'] = 'dummy' parser = RstParser() parser.parse(rst, document) SmartQuotes(document, startnode=None).apply() for msg in document.traverse(nodes.system_message): if msg['level'] == 1: msg.replace_self([]) return document
def apply(self): # type: () -> None if not self.is_available(): return SmartQuotes.apply(self)