sphinx/tests/root/parsermod.py
Georg Brandl ad612fb03d Change the source parsers feature a bit:
* parsers -> source_parsers
* add docs
* require fully qualified name or class
* add test for it
2015-03-08 13:12:50 +01:00

13 lines
320 B
Python

from docutils.parsers import Parser
from docutils import nodes
class Parser(Parser):
def parse(self, input, document):
section = nodes.section(ids=['id1'])
section += nodes.title('Generated section', 'Generated section')
document += section
def get_transforms(self):
return []