summaryrefslogtreecommitdiff
path: root/tests/root/parsermod.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2015-03-08 13:11:28 +0100
committerGeorg Brandl <georg@python.org>2015-03-08 13:12:50 +0100
commitad612fb03da13f5b7108c5eaa10f6f66eeb2fb77 (patch)
tree429da863684913a3a60380946ae7ac63e8f74652 /tests/root/parsermod.py
parent0cb9b1db0203189eeb6d4935a2bbc5ee61fb3c68 (diff)
downloadsphinx-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.py12
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 []