local-parser.py 594 B

123456789101112131415161718192021
  1. # -*- coding: utf-8 -*-
  2. # $Id: local-parser.py 7504 2012-08-27 07:55:20Z grubert $
  3. # Authors: Engelbert Gruber <grubert@users.sourceforge.net>
  4. # Toshio Kuratomi <toshio@fedoraproject.org>
  5. # Copyright: This module is put into the public domain.
  6. """
  7. mini-reader to test get_reader_class with local reader
  8. """
  9. from docutils import parsers
  10. class Parser(parsers.Parser):
  11. supported = ('dummy',)
  12. """Formats this reader supports."""
  13. def parser(self, inputstring, document):
  14. self.setup_parse(inputstring, document)
  15. document = dict()
  16. self.finish_parse()