diff options
author | Georg Brandl <georg@python.org> | 2015-03-08 13:11:28 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2015-03-08 13:12:50 +0100 |
commit | ad612fb03da13f5b7108c5eaa10f6f66eeb2fb77 (patch) | |
tree | 429da863684913a3a60380946ae7ac63e8f74652 /tests/root/parsermod.py | |
parent | 0cb9b1db0203189eeb6d4935a2bbc5ee61fb3c68 (diff) | |
download | sphinx-git-ad612fb03da13f5b7108c5eaa10f6f66eeb2fb77.tar.gz |
Change the source parsers feature a bit:
* parsers -> source_parsers
* add docs
* require fully qualified name or class
* add test for it
Diffstat (limited to 'tests/root/parsermod.py')
-rw-r--r-- | tests/root/parsermod.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/root/parsermod.py b/tests/root/parsermod.py new file mode 100644 index 000000000..3e5330ac8 --- /dev/null +++ b/tests/root/parsermod.py @@ -0,0 +1,12 @@ +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 [] |