@diplodoc/cli-tests 5.2.2 → 5.3.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.
Files changed (48) hide show
  1. package/e2e/__snapshots__/generate-map.spec.ts.snap +345 -0
  2. package/e2e/__snapshots__/preprocess.test.ts.snap +497 -0
  3. package/e2e/__snapshots__/regression.test.ts.snap +76 -57
  4. package/e2e/generate-map.spec.ts +9 -3
  5. package/e2e/preprocess.test.ts +21 -0
  6. package/mocks/preprocess/test1/input/.yfm +2 -0
  7. package/mocks/preprocess/test1/input/1.md +29 -0
  8. package/mocks/preprocess/test1/input/_assets/1.png +0 -0
  9. package/mocks/preprocess/test1/input/autotitle.md +23 -0
  10. package/mocks/preprocess/test1/input/commented-include.md +3 -0
  11. package/mocks/preprocess/test1/input/images.md +5 -0
  12. package/mocks/preprocess/test1/input/included-item.md +12 -0
  13. package/mocks/preprocess/test1/input/includes/deep.md +1 -0
  14. package/mocks/preprocess/test1/input/includes/presets.yaml +2 -0
  15. package/mocks/preprocess/test1/input/includes/sub/user.md +1 -0
  16. package/mocks/preprocess/test1/input/includes/test.md +1 -0
  17. package/mocks/preprocess/test1/input/includes/user.md +1 -0
  18. package/mocks/preprocess/test1/input/includes.md +14 -0
  19. package/mocks/preprocess/test1/input/latex.md +3 -0
  20. package/mocks/preprocess/test1/input/mermaid.md +13 -0
  21. package/mocks/preprocess/test1/input/presets.yaml +8 -0
  22. package/mocks/preprocess/test1/input/sub/folder/item-1.md +5 -0
  23. package/mocks/preprocess/test1/input/sub/toc.yaml +5 -0
  24. package/mocks/preprocess/test1/input/toc-i.yaml +3 -0
  25. package/mocks/preprocess/test1/input/toc.yaml +16 -0
  26. package/mocks/preprocess/test2/input/.yfm +2 -0
  27. package/mocks/preprocess/test2/input/1.md +29 -0
  28. package/mocks/preprocess/test2/input/_assets/1.png +0 -0
  29. package/mocks/preprocess/test2/input/autotitle.md +23 -0
  30. package/mocks/preprocess/test2/input/commented-include.md +3 -0
  31. package/mocks/preprocess/test2/input/images.md +5 -0
  32. package/mocks/preprocess/test2/input/included-item.md +12 -0
  33. package/mocks/preprocess/test2/input/includes/deep.md +1 -0
  34. package/mocks/preprocess/test2/input/includes/presets.yaml +2 -0
  35. package/mocks/preprocess/test2/input/includes/sub/user.md +1 -0
  36. package/mocks/preprocess/test2/input/includes/test.md +1 -0
  37. package/mocks/preprocess/test2/input/includes/user.md +1 -0
  38. package/mocks/preprocess/test2/input/includes.md +14 -0
  39. package/mocks/preprocess/test2/input/latex.md +3 -0
  40. package/mocks/preprocess/test2/input/mermaid.md +13 -0
  41. package/mocks/preprocess/test2/input/presets.yaml +8 -0
  42. package/mocks/preprocess/test2/input/sub/folder/item-1.md +5 -0
  43. package/mocks/preprocess/test2/input/sub/toc.yaml +5 -0
  44. package/mocks/preprocess/test2/input/toc-i.yaml +3 -0
  45. package/mocks/preprocess/test2/input/toc.yaml +16 -0
  46. package/mocks/regression/input/.yfm +2 -0
  47. package/mocks/regression/input/includes.md +5 -0
  48. package/package.json +1 -1
@@ -0,0 +1,8 @@
1
+ default:
2
+ default-var: default-var-value
3
+ not-var: not-var-value
4
+ product: root
5
+ user: Bob
6
+
7
+ internal:
8
+ default-var: default-var-internal-value
@@ -0,0 +1,5 @@
1
+ # Item 1
2
+
3
+ Item 1 text
4
+
5
+ [{#T}](../../images.md)
@@ -0,0 +1,5 @@
1
+ items:
2
+ name: Named include (items is Object here - this is not an error)
3
+ items:
4
+ - name: Item 1
5
+ href: folder/item-1.md
@@ -0,0 +1,3 @@
1
+ items:
2
+ - name: Included Item
3
+ href: ./included-item.md
@@ -0,0 +1,16 @@
1
+ items:
2
+ - name: Md item with not_var syntax
3
+ href: ./1.md
4
+ - name: Md item named without extension
5
+ href: ./1
6
+ - include: {path: toc-i.yaml}
7
+ - include: {path: sub/toc.yaml, mode: link}
8
+ - href: ./mermaid
9
+ - name: '{#T}'
10
+ href: ./latex
11
+ - name: Images
12
+ href: ./images
13
+ - name: Autotitle
14
+ href: ./autotitle
15
+ - name: includes
16
+ href: ./includes
@@ -0,0 +1,2 @@
1
+ preprocess:
2
+ mergeAutotitles: true
@@ -0,0 +1,29 @@
1
+ # Title
2
+
3
+ Text not_var{{not-var}} not_var{{skip()}} {{default-var}}
4
+
5
+ Text `not_var{{not-var}}` `not_var{{skip()}}` `{{default-var}}`
6
+
7
+ Text
8
+ ```
9
+ not_var{{not-var}}
10
+
11
+ not_var{{skip()}}
12
+
13
+ {{default-var}}
14
+ ```
15
+
16
+
17
+ `[not a link](./path/to/relative/file.md)`
18
+
19
+ ## Subtitle {#subtitle}
20
+
21
+ [{#T}](./mermaid.md)
22
+
23
+ [{#T}](./mermaid.md#info)
24
+
25
+ [](./latex.md)
26
+
27
+ [noext-link](./includes)
28
+
29
+ {% include [user](includes/user.md) %}
File without changes
@@ -0,0 +1,23 @@
1
+ # Autotitles
2
+
3
+ Empty title
4
+ [](./1.md)
5
+
6
+ Empty subtitle
7
+ [](./1.md#subtitle)
8
+
9
+ Special title
10
+ [{#T}](./1.md)
11
+
12
+ Special subtitle
13
+ [{#T}](./1.md#subtitle)
14
+
15
+ Empty local title
16
+ [](#header)
17
+
18
+ Special local title
19
+ [{#T}](#header)
20
+
21
+ ## Header {#header}
22
+
23
+ Content
@@ -0,0 +1,3 @@
1
+ ![](./missed-asset.png)
2
+
3
+ [](./missed-link.md)
@@ -0,0 +1,5 @@
1
+ # Images
2
+
3
+ ![simple image](_assets/1.png)
4
+
5
+
@@ -0,0 +1,12 @@
1
+ # Included item
2
+
3
+ Included item text
4
+
5
+ <!-- : {% include [rec-off](./commented-include.md) %} -->
6
+
7
+ {% note alert "Alert!" %}
8
+
9
+ <!-- content -->
10
+
11
+ {% endnote %}
12
+
@@ -0,0 +1 @@
1
+ {% include [user](./sub/user.md) %}
@@ -0,0 +1,2 @@
1
+ default:
2
+ user: Alice
@@ -0,0 +1 @@
1
+ {{user}}
@@ -0,0 +1,14 @@
1
+ Text
2
+
3
+ {% include [user](includes/user.md) %}
4
+
5
+ {% include [test](includes/test.md) %}
6
+
7
+ Link after include
8
+ [{#T}](./1.md)
9
+
10
+ <!--{% include [For includes/deep.md](includes/deep.md) %}-->
11
+ {% include [For includes/deep.md](includes/deep.md) %}
12
+
13
+ Link after include
14
+ [{#T}](./1.md#subtitle)
@@ -0,0 +1,3 @@
1
+ # Latex usage
2
+
3
+ $\sqrt{3x-1}+(1+x)^2$
@@ -0,0 +1,13 @@
1
+ # Mermaid usage
2
+
3
+ ```mermaid
4
+
5
+ sequenceDiagram
6
+ rect rgba(251, 243, 232, 0.2)
7
+ Alice ->> Bob:
8
+ end
9
+ ```
10
+
11
+ ## Mermaid info {#info}
12
+
13
+ Some mermaid info
@@ -0,0 +1,8 @@
1
+ default:
2
+ default-var: default-var-value
3
+ not-var: not-var-value
4
+ product: root
5
+ user: Bob
6
+
7
+ internal:
8
+ default-var: default-var-internal-value
@@ -0,0 +1,5 @@
1
+ # Item 1
2
+
3
+ Item 1 text
4
+
5
+ [{#T}](../../images.md)
@@ -0,0 +1,5 @@
1
+ items:
2
+ name: Named include (items is Object here - this is not an error)
3
+ items:
4
+ - name: Item 1
5
+ href: folder/item-1.md
@@ -0,0 +1,3 @@
1
+ items:
2
+ - name: Included Item
3
+ href: ./included-item.md
@@ -0,0 +1,16 @@
1
+ items:
2
+ - name: Md item with not_var syntax
3
+ href: ./1.md
4
+ - name: Md item named without extension
5
+ href: ./1
6
+ - include: {path: toc-i.yaml}
7
+ - include: {path: sub/toc.yaml, mode: link}
8
+ - href: ./mermaid
9
+ - name: '{#T}'
10
+ href: ./latex
11
+ - name: Images
12
+ href: ./images
13
+ - name: Autotitle
14
+ href: ./autotitle
15
+ - name: includes
16
+ href: ./includes
@@ -0,0 +1,2 @@
1
+ preprocess:
2
+ mergeAutotitles: true
@@ -6,3 +6,8 @@ Text
6
6
 
7
7
  <!--{% include [For includes/deep.md](includes/deep.md) %}-->
8
8
  {% include [For includes/deep.md](includes/deep.md) %}
9
+
10
+ Link after include
11
+ [{#T}](./1.md#subtitle)
12
+
13
+ Link after include
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diplodoc/cli-tests",
3
- "version": "5.2.2",
3
+ "version": "5.3.0",
4
4
  "bin": {
5
5
  "diplodoc-cli-test": "bin.mjs"
6
6
  },