summaryrefslogtreecommitdiffstats
path: root/tests/test_sphinx/sourcedirs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_sphinx/sourcedirs')
-rw-r--r--tests/test_sphinx/sourcedirs/.gitignore1
-rw-r--r--tests/test_sphinx/sourcedirs/basic/conf.py2
-rw-r--r--tests/test_sphinx/sourcedirs/basic/content.md104
-rw-r--r--tests/test_sphinx/sourcedirs/basic/example.jpgbin0 -> 57841 bytes
-rw-r--r--tests/test_sphinx/sourcedirs/basic/index.md3
-rw-r--r--tests/test_sphinx/sourcedirs/basic/orphan.md5
-rw-r--r--tests/test_sphinx/sourcedirs/commonmark_only/conf.py3
-rw-r--r--tests/test_sphinx/sourcedirs/commonmark_only/index.md7
-rw-r--r--tests/test_sphinx/sourcedirs/extended_syntaxes/conf.py20
-rw-r--r--tests/test_sphinx/sourcedirs/extended_syntaxes/fun-fish.pngbin0 -> 92086 bytes
-rw-r--r--tests/test_sphinx/sourcedirs/extended_syntaxes/index.md67
-rw-r--r--tests/test_sphinx/sourcedirs/fieldlist/conf.py4
-rw-r--r--tests/test_sphinx/sourcedirs/fieldlist/index.md19
-rw-r--r--tests/test_sphinx/sourcedirs/footnotes/conf.py2
-rw-r--r--tests/test_sphinx/sourcedirs/footnotes/footnote_md.md29
-rw-r--r--tests/test_sphinx/sourcedirs/footnotes/footnote_rst.rst26
-rw-r--r--tests/test_sphinx/sourcedirs/footnotes/index.md4
-rw-r--r--tests/test_sphinx/sourcedirs/gettext/conf.py4
-rw-r--r--tests/test_sphinx/sourcedirs/gettext/fr/LC_MESSAGES/index.po127
-rw-r--r--tests/test_sphinx/sourcedirs/gettext/fun-fish.pngbin0 -> 92086 bytes
-rw-r--r--tests/test_sphinx/sourcedirs/gettext/index.md63
-rw-r--r--tests/test_sphinx/sourcedirs/gettext/poisson-amusant.pngbin0 -> 92086 bytes
-rw-r--r--tests/test_sphinx/sourcedirs/heading_slug_func/conf.py6
-rw-r--r--tests/test_sphinx/sourcedirs/heading_slug_func/index.md3
-rw-r--r--tests/test_sphinx/sourcedirs/include_from_rst/conf.py2
-rw-r--r--tests/test_sphinx/sourcedirs/include_from_rst/include.md5
-rw-r--r--tests/test_sphinx/sourcedirs/include_from_rst/index.rst5
-rw-r--r--tests/test_sphinx/sourcedirs/includes/conf.py2
-rw-r--r--tests/test_sphinx/sourcedirs/includes/example1.jpgbin0 -> 57841 bytes
-rw-r--r--tests/test_sphinx/sourcedirs/includes/include1.inc.md12
-rw-r--r--tests/test_sphinx/sourcedirs/includes/include_code.py2
-rw-r--r--tests/test_sphinx/sourcedirs/includes/include_literal.txt6
-rw-r--r--tests/test_sphinx/sourcedirs/includes/index.md31
-rw-r--r--tests/test_sphinx/sourcedirs/includes/subfolder/example2.jpgbin0 -> 57841 bytes
-rw-r--r--tests/test_sphinx/sourcedirs/includes/subfolder/include2.inc.md21
-rw-r--r--tests/test_sphinx/sourcedirs/mathjax/conf.py12
-rw-r--r--tests/test_sphinx/sourcedirs/mathjax/index.md5
-rw-r--r--tests/test_sphinx/sourcedirs/references/conf.py3
-rw-r--r--tests/test_sphinx/sourcedirs/references/file_link.txt0
-rw-r--r--tests/test_sphinx/sourcedirs/references/index.md54
-rw-r--r--tests/test_sphinx/sourcedirs/references/other.md3
-rw-r--r--tests/test_sphinx/sourcedirs/references/subfolder/file_link2.txt0
-rw-r--r--tests/test_sphinx/sourcedirs/references/subfolder/other2.md3
-rw-r--r--tests/test_sphinx/sourcedirs/references_singlehtml/conf.py6
-rw-r--r--tests/test_sphinx/sourcedirs/references_singlehtml/index.md15
-rw-r--r--tests/test_sphinx/sourcedirs/references_singlehtml/other/index.md6
-rw-r--r--tests/test_sphinx/sourcedirs/references_singlehtml/other/other.md9
-rw-r--r--tests/test_sphinx/sourcedirs/references_singlehtml/other/other2.md1
-rw-r--r--tests/test_sphinx/sourcedirs/substitutions/conf.py4
-rw-r--r--tests/test_sphinx/sourcedirs/substitutions/fun-fish.pngbin0 -> 92086 bytes
-rw-r--r--tests/test_sphinx/sourcedirs/substitutions/index.md56
-rw-r--r--tests/test_sphinx/sourcedirs/substitutions/other.md3
-rw-r--r--tests/test_sphinx/sourcedirs/texi_table/conf.py2
-rw-r--r--tests/test_sphinx/sourcedirs/texi_table/index.md3
54 files changed, 770 insertions, 0 deletions
diff --git a/tests/test_sphinx/sourcedirs/.gitignore b/tests/test_sphinx/sourcedirs/.gitignore
new file mode 100644
index 0000000..69fa449
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/.gitignore
@@ -0,0 +1 @@
+_build/
diff --git a/tests/test_sphinx/sourcedirs/basic/conf.py b/tests/test_sphinx/sourcedirs/basic/conf.py
new file mode 100644
index 0000000..e1c5009
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/basic/conf.py
@@ -0,0 +1,2 @@
+extensions = ["myst_parser"]
+exclude_patterns = ["_build"]
diff --git a/tests/test_sphinx/sourcedirs/basic/content.md b/tests/test_sphinx/sourcedirs/basic/content.md
new file mode 100644
index 0000000..ab7b6e2
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/basic/content.md
@@ -0,0 +1,104 @@
+---
+author: Chris Sewell
+authors: Chris Sewell, Chris Hodgraf
+organization: EPFL
+address: |
+ 1 Cedar Park Close
+ Thundersley
+ Essex
+contact: <https://example.com>
+version: 1.0
+revision: 1.1
+status: good
+date: 2/12/1985
+copyright: MIT
+dedication: |
+ To my *homies*
+abstract:
+ Something something **dark** side
+other: Something else
+other_dict:
+ key: value
+---
+
+(target)=
+
+# Header
+
+% comment
+
+````{note}
+abcd *abc* [google](https://www.google.com)
+
+ ```{warning}
+ xyz
+ ```
+
+````
+
+```{admonition} Title with [link](target2)
+Content
+```
+
+(target2)=
+
+```{figure} example.jpg
+---
+height: 40px
+target: https://www.google.com
+---
+Caption
+```
+
+![*alternative text*](example.jpg)
+
+<https://www.google.com>
+
+**{code}`` a=1{`} ``**
+
+{math}`sdfds`
+
+**$a=1$**
+
+$$b=2$$
+
+$$c=2$$ (eq:label)
+
+{eq}`eq:label`
+
+`` a=1{`} ``
+
+| a | b |
+|-----|--:|
+| *a* | 2 |
+| [link-a](https://google.com) | [link-b](https://python.org) |
+
+this
+is
+a
+paragraph
+% a comment 2
+
+this is a second paragraph
+
+- a list
+ - a sub list
+% a comment 3
+- new list?
+
+{ref}`target` {ref}`target2`
+
++++ a block break
+
+[name][key]
+
+[key]: https://www.google.com "a title"
+
+```
+def func(a, b=1):
+ print(a)
+```
+
+Special substitution references:
+
+{sub-ref}`wordcount-words` words | {sub-ref}`wordcount-minutes` min read
diff --git a/tests/test_sphinx/sourcedirs/basic/example.jpg b/tests/test_sphinx/sourcedirs/basic/example.jpg
new file mode 100644
index 0000000..1c1e83e
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/basic/example.jpg
Binary files differ
diff --git a/tests/test_sphinx/sourcedirs/basic/index.md b/tests/test_sphinx/sourcedirs/basic/index.md
new file mode 100644
index 0000000..1c9d9c7
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/basic/index.md
@@ -0,0 +1,3 @@
+```{toctree}
+content
+```
diff --git a/tests/test_sphinx/sourcedirs/basic/orphan.md b/tests/test_sphinx/sourcedirs/basic/orphan.md
new file mode 100644
index 0000000..c42b7c3
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/basic/orphan.md
@@ -0,0 +1,5 @@
+---
+orphan: true
+---
+
+This is an orphan document, not specified in any toctrees.
diff --git a/tests/test_sphinx/sourcedirs/commonmark_only/conf.py b/tests/test_sphinx/sourcedirs/commonmark_only/conf.py
new file mode 100644
index 0000000..ef5f1d8
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/commonmark_only/conf.py
@@ -0,0 +1,3 @@
+extensions = ["myst_parser"]
+exclude_patterns = ["_build"]
+myst_commonmark_only = True
diff --git a/tests/test_sphinx/sourcedirs/commonmark_only/index.md b/tests/test_sphinx/sourcedirs/commonmark_only/index.md
new file mode 100644
index 0000000..4212519
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/commonmark_only/index.md
@@ -0,0 +1,7 @@
+# Test
+
+```{note}
+hallo
+```
+
+{a}`b`
diff --git a/tests/test_sphinx/sourcedirs/extended_syntaxes/conf.py b/tests/test_sphinx/sourcedirs/extended_syntaxes/conf.py
new file mode 100644
index 0000000..9845000
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/extended_syntaxes/conf.py
@@ -0,0 +1,20 @@
+extensions = ["myst_parser"]
+language = "en"
+exclude_patterns = ["_build"]
+myst_disable_syntax = ["emphasis"]
+myst_dmath_allow_space = False
+myst_dmath_double_inline = True
+mathjax_config = {}
+myst_enable_extensions = [
+ "dollarmath",
+ "amsmath",
+ "deflist",
+ "colon_fence",
+ "linkify",
+ "tasklist",
+]
+myst_number_code_blocks = ["typescript"]
+myst_html_meta = {
+ "description lang=en": "meta description",
+ "property=og:locale": "en_US",
+}
diff --git a/tests/test_sphinx/sourcedirs/extended_syntaxes/fun-fish.png b/tests/test_sphinx/sourcedirs/extended_syntaxes/fun-fish.png
new file mode 100644
index 0000000..c9a4997
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/extended_syntaxes/fun-fish.png
Binary files differ
diff --git a/tests/test_sphinx/sourcedirs/extended_syntaxes/index.md b/tests/test_sphinx/sourcedirs/extended_syntaxes/index.md
new file mode 100644
index 0000000..e9fcea9
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/extended_syntaxes/index.md
@@ -0,0 +1,67 @@
+# Test
+
+*disabled*
+
+$a=1$
+
+$$x=5$$
+
+$$x=5$$ (2)
+
+$ a=1 $
+
+a $$c=3$$ b
+
+\begin{equation}
+b=2
+\end{equation}
+
+```{math}
+c=3
+
+d=4
+```
+
+Term **1**
+
+: Definition *1*
+
+ second paragraph
+
+Term 2
+ ~ Definition 2a
+ ~ Definition 2b
+
+Term 3
+ : code block
+
+ : > quote
+
+ : other
+
+:::{figure-md} target
+:class: other
+
+![fun-fish](fun-fish.png)
+
+This is a caption in **Markdown**
+:::
+
+:::{figure-md} other-target
+:class: other
+
+<img src="fun-fish.png" alt="fishy" class="bg-primary mb-1" width="200px">
+
+This is a caption in **Markdown**
+:::
+
+linkify URL: www.example.com
+
+- [ ] hallo
+- [x] there
+
+Numbered code block:
+
+```typescript
+type Result = "pass" | "fail"
+```
diff --git a/tests/test_sphinx/sourcedirs/fieldlist/conf.py b/tests/test_sphinx/sourcedirs/fieldlist/conf.py
new file mode 100644
index 0000000..1e3d992
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/fieldlist/conf.py
@@ -0,0 +1,4 @@
+extensions = ["myst_parser"]
+exclude_patterns = ["_build"]
+
+myst_enable_extensions = ["fieldlist"]
diff --git a/tests/test_sphinx/sourcedirs/fieldlist/index.md b/tests/test_sphinx/sourcedirs/fieldlist/index.md
new file mode 100644
index 0000000..2ed4856
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/fieldlist/index.md
@@ -0,0 +1,19 @@
+:orphan:
+
+# Test
+
+:field:
+
+:*field*: content
+
+```{py:function} send_message(sender, priority)
+
+Send a message to a recipient
+
+:param str sender: The person sending the message
+:param priority: The priority of the message, can be a number 1-5
+:type priority: int
+:return: the message id
+:rtype: int
+:raises ValueError: if the message_body exceeds 160 characters
+```
diff --git a/tests/test_sphinx/sourcedirs/footnotes/conf.py b/tests/test_sphinx/sourcedirs/footnotes/conf.py
new file mode 100644
index 0000000..e1c5009
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/footnotes/conf.py
@@ -0,0 +1,2 @@
+extensions = ["myst_parser"]
+exclude_patterns = ["_build"]
diff --git a/tests/test_sphinx/sourcedirs/footnotes/footnote_md.md b/tests/test_sphinx/sourcedirs/footnotes/footnote_md.md
new file mode 100644
index 0000000..ca46d0e
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/footnotes/footnote_md.md
@@ -0,0 +1,29 @@
+# Footnotes with Markdown
+
+[^c]
+
+```{note}
+[^d]
+```
+
+[^a]
+
+[^a]: some footnote *text*
+
+[^b]: a footnote before its reference
+
+[^b]
+
+[^c]: a footnote referenced first
+
+[^d]: a footnote referenced in a directive
+
+[^123] [^123]
+
+[^123]: multiple references footnote
+
+[^x]: an unreferenced footnote
+
+[^e]
+
+> - [^e]: footnote definition in a block element
diff --git a/tests/test_sphinx/sourcedirs/footnotes/footnote_rst.rst b/tests/test_sphinx/sourcedirs/footnotes/footnote_rst.rst
new file mode 100644
index 0000000..219f98a
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/footnotes/footnote_rst.rst
@@ -0,0 +1,26 @@
+Footnotes with rST
+------------------
+
+[#c]_
+
+.. note::
+
+ [#d]_
+
+[#a]_
+
+.. [#a] some footnote *text*
+
+.. [#b] a footnote before its reference
+
+[#b]_
+
+.. [#c] a footnote referenced first
+
+.. [#d] a footnote referenced in a directive
+
+[#123]_ [#123]_
+
+.. [#123] multiple references footnote
+
+.. [#x] an unreferenced footnote
diff --git a/tests/test_sphinx/sourcedirs/footnotes/index.md b/tests/test_sphinx/sourcedirs/footnotes/index.md
new file mode 100644
index 0000000..4e4bc08
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/footnotes/index.md
@@ -0,0 +1,4 @@
+```{toctree}
+footnote_rst
+footnote_md
+```
diff --git a/tests/test_sphinx/sourcedirs/gettext/conf.py b/tests/test_sphinx/sourcedirs/gettext/conf.py
new file mode 100644
index 0000000..0dff9fe
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/gettext/conf.py
@@ -0,0 +1,4 @@
+extensions = ["myst_parser"]
+exclude_patterns = ["_build"]
+copyright = "2020, Executable Book Project"
+myst_enable_extensions = ["deflist"]
diff --git a/tests/test_sphinx/sourcedirs/gettext/fr/LC_MESSAGES/index.po b/tests/test_sphinx/sourcedirs/gettext/fr/LC_MESSAGES/index.po
new file mode 100644
index 0000000..43e5320
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/gettext/fr/LC_MESSAGES/index.po
@@ -0,0 +1,127 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) XXXX, Executable Book Project
+# This file is distributed under the same license as the Python package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: Python \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2000-01-01 00:00+0000\n"
+"PO-Revision-Date: 2000-01-01 00:00+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "**bold** text 1"
+msgstr "texte 1 en **gras**"
+
+msgid "**bold** text 2"
+msgstr "texte 2 en **gras**"
+
+msgid "**bold** text 3"
+msgstr "texte 3 en **gras**"
+
+msgid "**bold** text 4"
+msgstr "texte 4 en **gras**"
+
+msgid "**bold** text 5"
+msgstr "texte 5 en **gras**"
+
+msgid "**bold** text 6"
+msgstr "texte 6 en **gras**"
+
+msgid "**bold** text 7"
+msgstr "texte 7 en **gras**"
+
+msgid "**bold** text 8"
+msgstr "texte 8 en **gras**"
+
+msgid "**bold** text 9"
+msgstr "texte 9 en **gras**"
+
+msgid "**bold** text 10"
+msgstr "texte 10 en **gras**"
+
+msgid "<div markdown=1>\n"
+""
+msgstr "<span markdown=1>\n"
+""
+
+msgid "**bold** text 11"
+msgstr "texte 11 en **gras**"
+
+msgid "Extra ```backticks```"
+msgstr "\"```Backtick```\" supplémentaire"
+
+msgid "</div>\n"
+""
+msgstr "</span>\n"
+""
+
+msgid "**additional** text 12\n"
+""
+msgstr "texte 12 **supplémentaire**\n"
+""
+
+msgid "**additional** text 13\n"
+""
+msgstr "texte 13 **supplémentaire**\n"
+""
+
+msgid "{\n"
+" \"additional\": \"text 14\"\n"
+"}\n"
+""
+msgstr "{\n"
+" \"supplémentaire\": \"texte 14\"\n"
+"}\n"
+""
+
+msgid "<h3>**additional** text 15</h3>\n"
+""
+msgstr "<h3>texte 15 **supplémentaire**</h3>\n"
+""
+
+msgid ">>> print('doctest block')\n"
+"doctest block\n"
+""
+msgstr ">>> print('bloque doctest')\n"
+"'bloque doctest\n"
+""
+
+msgid "<iframe src=\"http://sphinx-doc.org\"></iframe>"
+msgstr "<iframe src=\"http://sphinx-doc.org/fr/master/\"></iframe>"
+
+msgid "![Fun Fish 1](fun-fish.png)"
+msgstr "![Poisson amusant 1](poisson-amusant.png)"
+
+msgid "Fun Fish 1"
+msgstr "Poisson amusant 1"
+
+msgid ".. image:: fun-fish.png"
+msgstr ".. image:: poisson-amusant.png"
+
+msgid "Fun Fish 2"
+msgstr "Poisson amusant 2"
+
+msgid "Fun Fish 3"
+msgstr "Poisson amusant 3"
+
+msgid ".. image:: fun-fish.png\n"
+" :alt: Fun Fish 1"
+msgstr ".. image:: poisson-amusant.png\n"
+" :alt: Poisson amusant 1"
+
+msgid ".. image:: fun-fish.png\n"
+" :alt: Fun Fish 2"
+msgstr ".. image:: poisson-amusant.png\n"
+" :alt: Poisson amusant 2"
+
+msgid ".. image:: fun-fish.png\n"
+" :alt: Fun Fish 3"
+msgstr ".. image:: poisson-amusant.png\n"
+" :alt: Poisson amusant 3"
diff --git a/tests/test_sphinx/sourcedirs/gettext/fun-fish.png b/tests/test_sphinx/sourcedirs/gettext/fun-fish.png
new file mode 100644
index 0000000..c9a4997
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/gettext/fun-fish.png
Binary files differ
diff --git a/tests/test_sphinx/sourcedirs/gettext/index.md b/tests/test_sphinx/sourcedirs/gettext/index.md
new file mode 100644
index 0000000..a721944
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/gettext/index.md
@@ -0,0 +1,63 @@
+# **bold** text 1
+
+**bold** text 2
+
+> **bold** text 3
+
+```{eval-rst}
+.. note::
+
+ **bold** text 4
+```
+
+* **bold** text 5
+
+1. **bold** text 6
+
+**bold** text 7
+: **bold** text 8
+
+| **bold** text 9 |
+| ---------------- |
+| **bold** text 10 |
+
+<div markdown=1>
+
+**bold** text 11
+
+Extra ```backticks```
+
+</div>
+
+ **additional** text 12
+
+```
+**additional** text 13
+```
+
+```json
+{
+ "additional": "text 14"
+}
+```
+
+<h3>**additional** text 15</h3>
+
+```python
+>>> print('doctest block')
+doctest block
+```
+
+```{raw} html
+<iframe src="http://sphinx-doc.org"></iframe>
+```
+
+![Fun Fish 1](fun-fish.png)
+
+```{image} fun-fish.png
+:alt: Fun Fish 2
+```
+
+```{figure} fun-fish.png
+:alt: Fun Fish 3
+```
diff --git a/tests/test_sphinx/sourcedirs/gettext/poisson-amusant.png b/tests/test_sphinx/sourcedirs/gettext/poisson-amusant.png
new file mode 100644
index 0000000..c9a4997
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/gettext/poisson-amusant.png
Binary files differ
diff --git a/tests/test_sphinx/sourcedirs/heading_slug_func/conf.py b/tests/test_sphinx/sourcedirs/heading_slug_func/conf.py
new file mode 100644
index 0000000..f6612b4
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/heading_slug_func/conf.py
@@ -0,0 +1,6 @@
+from docutils.nodes import make_id
+
+extensions = ["myst_parser"]
+exclude_patterns = ["_build"]
+myst_heading_anchors = 2
+myst_heading_slug_func = make_id
diff --git a/tests/test_sphinx/sourcedirs/heading_slug_func/index.md b/tests/test_sphinx/sourcedirs/heading_slug_func/index.md
new file mode 100644
index 0000000..ec11ada
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/heading_slug_func/index.md
@@ -0,0 +1,3 @@
+# Hyphen - 1
+
+## Dot 1.1
diff --git a/tests/test_sphinx/sourcedirs/include_from_rst/conf.py b/tests/test_sphinx/sourcedirs/include_from_rst/conf.py
new file mode 100644
index 0000000..a743e3c
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/include_from_rst/conf.py
@@ -0,0 +1,2 @@
+extensions = ["myst_parser"]
+exclude_patterns = ["_build", "include.md"]
diff --git a/tests/test_sphinx/sourcedirs/include_from_rst/include.md b/tests/test_sphinx/sourcedirs/include_from_rst/include.md
new file mode 100644
index 0000000..20f34b9
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/include_from_rst/include.md
@@ -0,0 +1,5 @@
+# Markdown
+
+[target]
+
+[target]: http://example.com/
diff --git a/tests/test_sphinx/sourcedirs/include_from_rst/index.rst b/tests/test_sphinx/sourcedirs/include_from_rst/index.rst
new file mode 100644
index 0000000..0bb3177
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/include_from_rst/index.rst
@@ -0,0 +1,5 @@
+Title
+=====
+
+.. include:: include.md
+ :parser: myst_parser.sphinx_
diff --git a/tests/test_sphinx/sourcedirs/includes/conf.py b/tests/test_sphinx/sourcedirs/includes/conf.py
new file mode 100644
index 0000000..4cf4e93
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/includes/conf.py
@@ -0,0 +1,2 @@
+extensions = ["myst_parser"]
+exclude_patterns = ["_build", "*.inc.md", "**/*.inc.md"]
diff --git a/tests/test_sphinx/sourcedirs/includes/example1.jpg b/tests/test_sphinx/sourcedirs/includes/example1.jpg
new file mode 100644
index 0000000..1c1e83e
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/includes/example1.jpg
Binary files differ
diff --git a/tests/test_sphinx/sourcedirs/includes/include1.inc.md b/tests/test_sphinx/sourcedirs/includes/include1.inc.md
new file mode 100644
index 0000000..3eea6ac
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/includes/include1.inc.md
@@ -0,0 +1,12 @@
+---
+orphan: true
+---
+(inc_header)=
+## A Sub-Heading in Include
+
+Some text with *syntax*
+
+```{include} subfolder/include2.inc.md
+:relative-images:
+:relative-docs: ..
+```
diff --git a/tests/test_sphinx/sourcedirs/includes/include_code.py b/tests/test_sphinx/sourcedirs/includes/include_code.py
new file mode 100644
index 0000000..3158954
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/includes/include_code.py
@@ -0,0 +1,2 @@
+def a_func(param):
+ print(param)
diff --git a/tests/test_sphinx/sourcedirs/includes/include_literal.txt b/tests/test_sphinx/sourcedirs/includes/include_literal.txt
new file mode 100644
index 0000000..5bb9418
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/includes/include_literal.txt
@@ -0,0 +1,6 @@
+This should be *literal*
+
+Lots
+of
+lines
+so we can select some
diff --git a/tests/test_sphinx/sourcedirs/includes/index.md b/tests/test_sphinx/sourcedirs/includes/index.md
new file mode 100644
index 0000000..dc904e3
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/includes/index.md
@@ -0,0 +1,31 @@
+# Main Title
+
+```{include} include1.inc.md
+```
+
+{ref}`inc_header`
+
+```{include} include_code.py
+:code: python
+```
+
+```{include} include_code.py
+:code: python
+:number-lines: 0
+```
+
+```{include} include_literal.txt
+:literal:
+```
+
+```{include} include_literal.txt
+:literal:
+:name: literal_ref
+:start-line: 2
+:end-before: lines
+:number-lines: 0
+```
+
+### A Sub-sub-Heading
+
+some more text
diff --git a/tests/test_sphinx/sourcedirs/includes/subfolder/example2.jpg b/tests/test_sphinx/sourcedirs/includes/subfolder/example2.jpg
new file mode 100644
index 0000000..1c1e83e
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/includes/subfolder/example2.jpg
Binary files differ
diff --git a/tests/test_sphinx/sourcedirs/includes/subfolder/include2.inc.md b/tests/test_sphinx/sourcedirs/includes/subfolder/include2.inc.md
new file mode 100644
index 0000000..a6eebcf
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/includes/subfolder/include2.inc.md
@@ -0,0 +1,21 @@
+## A Sub-Heading in Nested Include
+
+Some other text with **syntax**
+
+This relative path will refer to the importing file:
+
+```{figure} example1.jpg
+Caption
+```
+
+This absolute path will refer to the project root (where the `conf.py` is):
+
+```{figure} /subfolder/example2.jpg
+Caption
+```
+
+![alt](example2.jpg)
+
+![alt](https://example.com)
+
+[text](../index.md)
diff --git a/tests/test_sphinx/sourcedirs/mathjax/conf.py b/tests/test_sphinx/sourcedirs/mathjax/conf.py
new file mode 100644
index 0000000..b2a70c8
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/mathjax/conf.py
@@ -0,0 +1,12 @@
+import sphinx
+
+extensions = ["myst_parser"]
+exclude_patterns = ["_build"]
+
+if sphinx.version_info[0] <= 3:
+ mathjax_config = {"tex2jax": {"processClass": "other"}}
+else:
+ mathjax3_config = {"options": {"processHtmlClass": "other"}}
+
+# this should remove the warning
+# suppress_warnings = ["myst.mathjax"]
diff --git a/tests/test_sphinx/sourcedirs/mathjax/index.md b/tests/test_sphinx/sourcedirs/mathjax/index.md
new file mode 100644
index 0000000..0226511
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/mathjax/index.md
@@ -0,0 +1,5 @@
+# Test
+
+```{math}
+a = 1
+```
diff --git a/tests/test_sphinx/sourcedirs/references/conf.py b/tests/test_sphinx/sourcedirs/references/conf.py
new file mode 100644
index 0000000..099510a
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/references/conf.py
@@ -0,0 +1,3 @@
+extensions = ["myst_parser"]
+exclude_patterns = ["_build"]
+myst_heading_anchors = 2
diff --git a/tests/test_sphinx/sourcedirs/references/file_link.txt b/tests/test_sphinx/sourcedirs/references/file_link.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/references/file_link.txt
diff --git a/tests/test_sphinx/sourcedirs/references/index.md b/tests/test_sphinx/sourcedirs/references/index.md
new file mode 100644
index 0000000..c31bedb
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/references/index.md
@@ -0,0 +1,54 @@
+(title)=
+
+# Title with **nested** $a=1$
+
+[](https://example.com)
+
+[plain text](https://example.com)
+
+[nested *syntax*](https://example.com)
+
+[](title)
+
+[plain text](title)
+
+[nested *syntax*](title)
+
+[](index.md)
+
+[plain text](index.md)
+
+[nested *syntax*](index.md)
+
+[download **link**](file_link.txt)
+
+[](subfolder/file_link2.txt)
+
+```{eval-rst}
+.. _insidecodeblock:
+
+I am inside the eval-rst fence
+
+Referencing the :ref:`title`
+
+Still inside the codeblock insidecodeblock_
+```
+
+I am outside the [fence](insidecodeblock)
+
+## Title *anchors*
+
+```{toctree}
+other.md
+subfolder/other2.md
+```
+
+[](#title-anchors)
+
+[](./#title-anchors)
+
+[](./other.md#title-anchors)
+
+[](other.md#title-anchors)
+
+[](subfolder/other2.md#title-anchors)
diff --git a/tests/test_sphinx/sourcedirs/references/other.md b/tests/test_sphinx/sourcedirs/references/other.md
new file mode 100644
index 0000000..9dfb9be
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/references/other.md
@@ -0,0 +1,3 @@
+# Title *anchors*
+
+a
diff --git a/tests/test_sphinx/sourcedirs/references/subfolder/file_link2.txt b/tests/test_sphinx/sourcedirs/references/subfolder/file_link2.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/references/subfolder/file_link2.txt
diff --git a/tests/test_sphinx/sourcedirs/references/subfolder/other2.md b/tests/test_sphinx/sourcedirs/references/subfolder/other2.md
new file mode 100644
index 0000000..6687282
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/references/subfolder/other2.md
@@ -0,0 +1,3 @@
+# Title *anchors*
+
+[](../index.md#title-anchors)
diff --git a/tests/test_sphinx/sourcedirs/references_singlehtml/conf.py b/tests/test_sphinx/sourcedirs/references_singlehtml/conf.py
new file mode 100644
index 0000000..0d760fc
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/references_singlehtml/conf.py
@@ -0,0 +1,6 @@
+extensions = [
+ "myst_parser",
+]
+master_doc = "index"
+exclude_patterns = ["_build"]
+myst_heading_anchors = 2
diff --git a/tests/test_sphinx/sourcedirs/references_singlehtml/index.md b/tests/test_sphinx/sourcedirs/references_singlehtml/index.md
new file mode 100644
index 0000000..d38d875
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/references_singlehtml/index.md
@@ -0,0 +1,15 @@
+# Title
+
+```{toctree}
+other/index
+```
+
+{doc}`other/other`
+
+{any}`other/other`
+
+[](./other/other.md)
+
+[](#title)
+
+[](./other/other.md#other-title)
diff --git a/tests/test_sphinx/sourcedirs/references_singlehtml/other/index.md b/tests/test_sphinx/sourcedirs/references_singlehtml/other/index.md
new file mode 100644
index 0000000..3a4fb08
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/references_singlehtml/other/index.md
@@ -0,0 +1,6 @@
+# Other Index
+
+```{toctree}
+other
+other2
+```
diff --git a/tests/test_sphinx/sourcedirs/references_singlehtml/other/other.md b/tests/test_sphinx/sourcedirs/references_singlehtml/other/other.md
new file mode 100644
index 0000000..a833673
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/references_singlehtml/other/other.md
@@ -0,0 +1,9 @@
+# Other Title
+
+{doc}`other2`
+
+{any}`other2`
+
+[](./other2.md)
+
+[](../index.md#title)
diff --git a/tests/test_sphinx/sourcedirs/references_singlehtml/other/other2.md b/tests/test_sphinx/sourcedirs/references_singlehtml/other/other2.md
new file mode 100644
index 0000000..f97239e
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/references_singlehtml/other/other2.md
@@ -0,0 +1 @@
+# Other 2 Title
diff --git a/tests/test_sphinx/sourcedirs/substitutions/conf.py b/tests/test_sphinx/sourcedirs/substitutions/conf.py
new file mode 100644
index 0000000..57c5d68
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/substitutions/conf.py
@@ -0,0 +1,4 @@
+extensions = ["myst_parser"]
+exclude_patterns = ["_build"]
+myst_enable_extensions = ["substitution"]
+myst_substitutions = {"conf": "This was from the conf", "override": "From conf"}
diff --git a/tests/test_sphinx/sourcedirs/substitutions/fun-fish.png b/tests/test_sphinx/sourcedirs/substitutions/fun-fish.png
new file mode 100644
index 0000000..c9a4997
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/substitutions/fun-fish.png
Binary files differ
diff --git a/tests/test_sphinx/sourcedirs/substitutions/index.md b/tests/test_sphinx/sourcedirs/substitutions/index.md
new file mode 100644
index 0000000..e1dd672
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/substitutions/index.md
@@ -0,0 +1,56 @@
+---
+myst:
+ substitutions:
+ text: "- text"
+ text_with_nest: >
+ output
+ with *Markdown*
+ {{ nested }}
+ nested: nested substitution
+ admonition: |
+ prefix
+
+ ```{note}
+ A note {{ nested }}
+ ```
+ inline_admonition: |
+ ```{note}
+ Inline note
+ ```
+ override: Overridden by front matter
+
+---
+
+{{ text_with_nest }}
+
+{{ admonition }}
+
+a {{ text }} b
+
+c {{ text_with_nest }} d
+
+e {{ inline_admonition }} f
+
+{{ conf }}
+
+{{ override }}
+
+This will process the substitution
+
+```{parsed-literal}
+{{ text_with_nest }}
+```
+
+This will not process the substitution
+
+```python
+{{ text_with_nest }}
+```
+
+Using env and filters:
+
+{{ env.docname | upper }}
+
+```{toctree}
+other.md
+```
diff --git a/tests/test_sphinx/sourcedirs/substitutions/other.md b/tests/test_sphinx/sourcedirs/substitutions/other.md
new file mode 100644
index 0000000..8681af4
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/substitutions/other.md
@@ -0,0 +1,3 @@
+# Other
+
+{{ override }}
diff --git a/tests/test_sphinx/sourcedirs/texi_table/conf.py b/tests/test_sphinx/sourcedirs/texi_table/conf.py
new file mode 100644
index 0000000..e1c5009
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/texi_table/conf.py
@@ -0,0 +1,2 @@
+extensions = ["myst_parser"]
+exclude_patterns = ["_build"]
diff --git a/tests/test_sphinx/sourcedirs/texi_table/index.md b/tests/test_sphinx/sourcedirs/texi_table/index.md
new file mode 100644
index 0000000..9face4b
--- /dev/null
+++ b/tests/test_sphinx/sourcedirs/texi_table/index.md
@@ -0,0 +1,3 @@
+| foo | bar |
+| --- | --- |
+| baz | bim |