tests/roots/test-root/parsermod.py
raw| 1 | from docutils import nodes |
| 2 | from docutils.parsers import Parser |
| 3 | |
| 4 | |
| 5 | class Parser(Parser): |
| 6 | supported = ('foo',) |
| 7 | |
| 8 | def parse(self, input, document): |
| 9 | section = nodes.section(ids=['id1']) |
| 10 | section += nodes.title('Generated section', 'Generated section') |
| 11 | document += section |
| 12 | |
| 13 | def get_transforms(self): |
| 14 | return [] |