def show_help(self, text): """Show help for comment text""" command, index = self._find_command(text) if command is None: message = help.__doc__ else: message = command.__doc__ or "" # if index <= len(text) or " " in text: # msg = [message] # # TODO handle exception # msg.append(self.parser(command).get_help(text, index)) # message = "\n\n".join(m for m in msg if m.strip()) if message: self.message(markdoc(message), msg_type=const.INFO) else: beep()
def test(input, output): eq_(mod.markdoc(input), output)