summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-root/parsermod.py
blob: de0849c80e3419afbf2fc71c5b5ff02510db6252 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from docutils import nodes
from docutils.parsers import Parser


class Parser(Parser):
    supported = ('foo',)

    def parse(self, input, document):
        section = nodes.section(ids=['id1'])
        section += nodes.title('Generated section', 'Generated section')
        document += section

    def get_transforms(self):
        return []