File: parsermod.py

package info (click to toggle)
sphinx 8.2.3-12
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid
  • size: 26,960 kB
  • sloc: python: 105,864; javascript: 6,474; perl: 449; makefile: 178; 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 []