summaryrefslogtreecommitdiff
path: root/tests/roots/test-add_source_parser/conf.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2016-01-01 12:06:46 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2016-01-04 10:23:17 +0900
commitf81ab1e8b9690902721901eda378a47d7dc6e8a0 (patch)
tree6d9139f228d651cb0900d420cd07a35e57eaed00 /tests/roots/test-add_source_parser/conf.py
parentddf6acd33c31af56738566363efc0ac21396a1fe (diff)
downloadsphinx-git-f81ab1e8b9690902721901eda378a47d7dc6e8a0.tar.gz
Fix #2162: Add Sphinx.add_source_parser() to add source_suffix and source_parsers from extension
Diffstat (limited to 'tests/roots/test-add_source_parser/conf.py')
-rw-r--r--tests/roots/test-add_source_parser/conf.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/roots/test-add_source_parser/conf.py b/tests/roots/test-add_source_parser/conf.py
new file mode 100644
index 000000000..f9969341a
--- /dev/null
+++ b/tests/roots/test-add_source_parser/conf.py
@@ -0,0 +1,18 @@
+# -*- coding: utf-8 -*-
+
+import os
+import sys
+from docutils.parsers import Parser
+
+sys.path.insert(0, os.path.abspath('.'))
+
+
+class DummyMarkdownParser(Parser):
+ pass
+
+
+extensions = ['test_source_parser']
+source_suffix = ['.rst', '.md']
+source_parsers = {
+ '.md': DummyMarkdownParser
+}