@diplodoc/cli-tests 5.13.2 → 5.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/e2e/__snapshots__/includes.test.ts.snap +477 -0
- package/e2e/__snapshots__/metadata.spec.ts.snap +19 -6
- package/e2e/__snapshots__/pdf-page.spec.ts.snap +2 -2
- package/e2e/__snapshots__/regression.test.ts.snap +64 -38
- package/e2e/includes.test.ts +38 -0
- package/fixtures/utils/file.ts +21 -0
- package/mocks/includes/input/.yfm +1 -0
- package/mocks/includes/input/_assets/4.png +0 -0
- package/mocks/includes/input/includes/commented-include.md +5 -0
- package/mocks/includes/input/includes/deep-include.md +13 -0
- package/mocks/includes/input/includes/fragments.md +23 -0
- package/mocks/includes/input/includes/nested-include.md +5 -0
- package/mocks/includes/input/includes/no-title-include.md +19 -0
- package/mocks/includes/input/includes/root-include.md +11 -0
- package/mocks/includes/input/includes/user.md +5 -0
- package/mocks/includes/input/index.md +62 -0
- package/mocks/includes/input/level1/includes/level1-include.md +11 -0
- package/mocks/includes/input/level1/level2/includes/level2-include.md +11 -0
- package/mocks/includes/input/level1/level2/page2.md +29 -0
- package/mocks/includes/input/level1/page1.md +29 -0
- package/mocks/includes/input/presets.yaml +3 -0
- package/mocks/includes/input/toc-include.md +13 -0
- package/mocks/includes/input/toc.yaml +13 -0
- package/mocks/includes-missing/input/index.md +7 -0
- package/mocks/includes-missing/input/toc.yaml +3 -0
- package/mocks/metadata/md2html-with-metadata/input/.yfm +1 -0
- package/mocks/metadata/md2html-with-metadata/input/page.md +3 -1
- package/mocks/regression/input/includes/fragments.md +17 -0
- package/mocks/regression/input/includes.md +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Include without title [→ index](../index.md) {#include-without-title}
|
|
2
|
+
|
|
3
|
+
[Link to index](../index.md)
|
|
4
|
+
|
|
5
|
+
This is a test for include without title.
|
|
6
|
+
|
|
7
|
+
## Include without title from the same directory
|
|
8
|
+
|
|
9
|
+
{% include notitle [user](user.md) %}
|
|
10
|
+
|
|
11
|
+
## Include without title with anchor
|
|
12
|
+
|
|
13
|
+
{% include notitle [fragment](fragments.md#section1) %}
|
|
14
|
+
|
|
15
|
+
## Include without title with paragraph anchor
|
|
16
|
+
|
|
17
|
+
{% include notitle [fragment](fragments.md#p1) %}
|
|
18
|
+
|
|
19
|
+
[Link to index](../index.md)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
This is an include from the root level.
|
|
2
|
+
|
|
3
|
+
[Link to level1](../level1/page1.md)
|
|
4
|
+
|
|
5
|
+
[Link to level2](../level1/level2/page2.md)
|
|
6
|
+
|
|
7
|
+
[Link to index](../index.md)
|
|
8
|
+
|
|
9
|
+
## Include with anchor [→ level1](../level1/page1.md) {#include-with-anchor}
|
|
10
|
+
|
|
11
|
+
{% include [fragment](fragments.md#section2) %}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Test Includes
|
|
2
|
+
|
|
3
|
+
This is a test page for various include scenarios.
|
|
4
|
+
|
|
5
|
+
## Include from root level
|
|
6
|
+
|
|
7
|
+
{% include [root-include](includes/root-include.md) %}
|
|
8
|
+
|
|
9
|
+
## Include from level1
|
|
10
|
+
|
|
11
|
+
{% include [level1-include](level1/includes/level1-include.md) %}
|
|
12
|
+
|
|
13
|
+
## Include from level2
|
|
14
|
+
|
|
15
|
+
{% include [level2-include](level1/level2/includes/level2-include.md) %}
|
|
16
|
+
|
|
17
|
+
## Include with missing file
|
|
18
|
+
|
|
19
|
+
<!-- {% include [missing](includes/missing.md) %} -->
|
|
20
|
+
|
|
21
|
+
## Include file that is in toc
|
|
22
|
+
|
|
23
|
+
[Link to toc-include](toc-include.md)
|
|
24
|
+
|
|
25
|
+
{% include [toc-include](toc-include.md) %}
|
|
26
|
+
|
|
27
|
+
## Links to different levels
|
|
28
|
+
|
|
29
|
+
[Link to level1](level1/page1.md)
|
|
30
|
+
|
|
31
|
+
[Link to level2](level1/level2/page2.md)
|
|
32
|
+
|
|
33
|
+
## Include with anchor
|
|
34
|
+
|
|
35
|
+
{% include [fragment](includes/fragments.md#section1) %}
|
|
36
|
+
|
|
37
|
+
## Include with multiple anchors
|
|
38
|
+
|
|
39
|
+
{% include [fragment](includes/fragments.md#section2) %}
|
|
40
|
+
|
|
41
|
+
## Include with paragraph anchor
|
|
42
|
+
|
|
43
|
+
{% include [fragment](includes/fragments.md#p1) %}
|
|
44
|
+
|
|
45
|
+
## Nested includes
|
|
46
|
+
|
|
47
|
+
{% include [nested](includes/nested-include.md) %}
|
|
48
|
+
|
|
49
|
+
## Deep nested includes
|
|
50
|
+
|
|
51
|
+
{% include [deep](includes/deep-include.md) %}
|
|
52
|
+
|
|
53
|
+
## Commented includes
|
|
54
|
+
|
|
55
|
+
<!-- {% include [commented](includes/commented-include.md) %} -->
|
|
56
|
+
|
|
57
|
+
## Include with variable substitution
|
|
58
|
+
|
|
59
|
+
{% include [user](includes/user.md) %}
|
|
60
|
+
## Include without title
|
|
61
|
+
|
|
62
|
+
{% include [no-title-include](includes/no-title-include.md) %}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
This is an include from level 1.
|
|
2
|
+
|
|
3
|
+
[Link to page1](../page1.md)
|
|
4
|
+
|
|
5
|
+
[Link to index](../../index.md)
|
|
6
|
+
|
|
7
|
+
[Link to level2](../level2/page2.md)
|
|
8
|
+
|
|
9
|
+
## Include with anchor [→ root](../../index.md) {#include-with-anchor}
|
|
10
|
+
|
|
11
|
+
{% include [fragment](../../includes/fragments.md#subsection21) %}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
This is an include from level 2.
|
|
2
|
+
|
|
3
|
+
[Link to page2](../page2.md)
|
|
4
|
+
|
|
5
|
+
[Link to page1](../../page1.md)
|
|
6
|
+
|
|
7
|
+
[Link to index](../../../index.md)
|
|
8
|
+
|
|
9
|
+
## Include with anchor [→ level1](../../page1.md) {#include-with-anchor}
|
|
10
|
+
|
|
11
|
+
{% include [fragment](../../../includes/fragments.md#section3) %}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Page 2
|
|
2
|
+
|
|
3
|
+
This is page 2 at level 2.
|
|
4
|
+
|
|
5
|
+
## Include from level2
|
|
6
|
+
|
|
7
|
+
{% include [level2-include](includes/level2-include.md) %}
|
|
8
|
+
|
|
9
|
+
## Include from level1
|
|
10
|
+
|
|
11
|
+
{% include [level1-include](../includes/level1-include.md) %}
|
|
12
|
+
|
|
13
|
+
## Include from root
|
|
14
|
+
|
|
15
|
+
{% include [root-include](../../includes/root-include.md) %}
|
|
16
|
+
|
|
17
|
+
## Links to different levels
|
|
18
|
+
|
|
19
|
+
[Link to index](../../index.md)
|
|
20
|
+
|
|
21
|
+
[Link to page1](../page1.md)
|
|
22
|
+
|
|
23
|
+
## Nested include
|
|
24
|
+
|
|
25
|
+
{% include [nested-include](../../includes/nested-include.md) %}
|
|
26
|
+
|
|
27
|
+
## Include with anchor
|
|
28
|
+
|
|
29
|
+
{% include [fragment](../../includes/fragments.md#section3) %}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Page 1
|
|
2
|
+
|
|
3
|
+
This is page 1 at level 1.
|
|
4
|
+
|
|
5
|
+
## Include from level1
|
|
6
|
+
|
|
7
|
+
{% include [level1-include](includes/level1-include.md) %}
|
|
8
|
+
|
|
9
|
+
## Include from root
|
|
10
|
+
|
|
11
|
+
{% include [root-include](../includes/root-include.md) %}
|
|
12
|
+
|
|
13
|
+
## Include from level2
|
|
14
|
+
|
|
15
|
+
{% include [level2-include](level2/includes/level2-include.md) %}
|
|
16
|
+
|
|
17
|
+
## Links to different levels
|
|
18
|
+
|
|
19
|
+
[Link to index](../index.md)
|
|
20
|
+
|
|
21
|
+
[Link to level2](level2/page2.md)
|
|
22
|
+
|
|
23
|
+
## Nested include
|
|
24
|
+
|
|
25
|
+
{% include [nested-include](../includes/nested-include.md) %}
|
|
26
|
+
|
|
27
|
+
## Include with anchor
|
|
28
|
+
|
|
29
|
+
{% include [fragment](../includes/fragments.md#subsection21) %}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
mtimes: true
|
|
@@ -4,6 +4,10 @@ Text
|
|
|
4
4
|
|
|
5
5
|
{% include [test](includes/test.md) %}
|
|
6
6
|
|
|
7
|
+
{% include [test](includes/fragments.md#f1) %}
|
|
8
|
+
|
|
9
|
+
{% include [test](includes/fragments.md#p1) %}
|
|
10
|
+
|
|
7
11
|
<!--{% include [For includes/deep.md](includes/deep.md) %}-->
|
|
8
12
|
{% include [For includes/deep.md](includes/deep.md) %}
|
|
9
13
|
|