File: local-parser.py

package info (click to toggle)
python-docutils 0.14%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,976 kB
  • sloc: python: 44,718; lisp: 14,476; xml: 1,782; sh: 167; makefile: 150
file content (21 lines) | stat: -rw-r--r-- 594 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- coding: utf-8 -*-
# $Id: local-parser.py 7504 2012-08-27 07:55:20Z grubert $
# Authors: Engelbert Gruber <grubert@users.sourceforge.net>
#          Toshio Kuratomi <toshio@fedoraproject.org>
# Copyright: This module is put into the public domain.

"""
mini-reader to test get_reader_class with local reader
"""

from docutils import parsers

class Parser(parsers.Parser):

    supported = ('dummy',)
    """Formats this reader supports."""

    def parser(self, inputstring, document):
        self.setup_parse(inputstring, document)
        document = dict()
        self.finish_parse()