File: parsermod.py

package info (click to toggle)
sphinx 9.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 28,732 kB
  • sloc: python: 109,394; javascript: 37,318; perl: 449; makefile: 183; sh: 37; xml: 19; ansic: 2
file content (14 lines) | stat: -rw-r--r-- 346 bytes parent folder | download | duplicates (48)
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 []