diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:23:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:23:02 +0000 |
commit | 943e3dc057eca53e68ddec51529bd6a1279ebd8e (patch) | |
tree | 61fb7bac619a56dfbcdcbdb7b0d4d6535fc36fe9 /tests/test_sphinx/sourcedirs/references | |
parent | Initial commit. (diff) | |
download | myst-parser-upstream.tar.xz myst-parser-upstream.zip |
Adding upstream version 0.18.1.upstream/0.18.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
11 files changed, 100 insertions, 0 deletions
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 |