diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 11:31:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 11:31:33 +0000 |
commit | e863fd965dd6253243c3342bd6f0adc4fc8aec4d (patch) | |
tree | a4c1b6491a82593950043c3f8b2530e80664d768 /tests/roots/test-prolog | |
parent | Initial commit. (diff) | |
download | sphinx-e863fd965dd6253243c3342bd6f0adc4fc8aec4d.tar.xz sphinx-e863fd965dd6253243c3342bd6f0adc4fc8aec4d.zip |
Adding upstream version 5.3.0.upstream/5.3.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/roots/test-prolog')
-rw-r--r-- | tests/roots/test-prolog/conf.py | 10 | ||||
-rw-r--r-- | tests/roots/test-prolog/index.rst | 7 | ||||
-rw-r--r-- | tests/roots/test-prolog/markdown.md | 3 | ||||
-rw-r--r-- | tests/roots/test-prolog/prolog_markdown_parser.py | 13 | ||||
-rw-r--r-- | tests/roots/test-prolog/restructuredtext.rst | 4 |
5 files changed, 37 insertions, 0 deletions
diff --git a/tests/roots/test-prolog/conf.py b/tests/roots/test-prolog/conf.py new file mode 100644 index 0000000..f6be09c --- /dev/null +++ b/tests/roots/test-prolog/conf.py @@ -0,0 +1,10 @@ +import os +import sys + +sys.path.insert(0, os.path.abspath('.')) + + +extensions = ['prolog_markdown_parser'] + +rst_prolog = '*Hello world*.\n\n' +rst_epilog = '\n\n*Good-bye world*.' diff --git a/tests/roots/test-prolog/index.rst b/tests/roots/test-prolog/index.rst new file mode 100644 index 0000000..2178d73 --- /dev/null +++ b/tests/roots/test-prolog/index.rst @@ -0,0 +1,7 @@ +prolog and epilog +================= + +.. toctree:: + + restructuredtext + markdown diff --git a/tests/roots/test-prolog/markdown.md b/tests/roots/test-prolog/markdown.md new file mode 100644 index 0000000..e400720 --- /dev/null +++ b/tests/roots/test-prolog/markdown.md @@ -0,0 +1,3 @@ +# sample document + +This is a sample document in markdown diff --git a/tests/roots/test-prolog/prolog_markdown_parser.py b/tests/roots/test-prolog/prolog_markdown_parser.py new file mode 100644 index 0000000..f8d787c --- /dev/null +++ b/tests/roots/test-prolog/prolog_markdown_parser.py @@ -0,0 +1,13 @@ +from docutils.parsers import Parser + + +class DummyMarkdownParser(Parser): + supported = ('markdown',) + + def parse(self, inputstring, document): + document.rawsource = inputstring + + +def setup(app): + app.add_source_suffix('.md', 'markdown') + app.add_source_parser(DummyMarkdownParser) diff --git a/tests/roots/test-prolog/restructuredtext.rst b/tests/roots/test-prolog/restructuredtext.rst new file mode 100644 index 0000000..f1fafb6 --- /dev/null +++ b/tests/roots/test-prolog/restructuredtext.rst @@ -0,0 +1,4 @@ +sample document +=============== + +This is a sample document in reST |