@diplodoc/cli-tests 0.0.0-rc-fix-translate-openapi-includer-202507171205 → 0.0.0-rc-resolve-codeblock-202509151421

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 (123) hide show
  1. package/e2e/__snapshots__/bundles.spec.ts.snap +168 -0
  2. package/e2e/__snapshots__/generate-map.spec.ts.snap +345 -0
  3. package/e2e/__snapshots__/include-toc.test.ts.snap +42 -0
  4. package/e2e/__snapshots__/load-custom-resources.spec.ts.snap +31 -117
  5. package/e2e/__snapshots__/metadata.spec.ts.snap +18 -51
  6. package/e2e/__snapshots__/plugin-corner-cases.spec.ts.snap +0 -0
  7. package/e2e/__snapshots__/preprocess.test.ts.snap +581 -0
  8. package/e2e/__snapshots__/regression.test.ts.snap +151 -268
  9. package/e2e/__snapshots__/restricted-access.test.ts.snap +20 -0
  10. package/e2e/__snapshots__/rtl.spec.ts.snap +6 -102
  11. package/e2e/__snapshots__/search.test.ts.snap +21 -36
  12. package/e2e/__snapshots__/single-page.spec.ts.snap +157 -0
  13. package/e2e/__snapshots__/skip-html-extension.spec.ts.snap +152 -0
  14. package/e2e/__snapshots__/translation.spec.ts.snap +469 -1186
  15. package/e2e/bundles.spec.ts +15 -0
  16. package/e2e/errors.spec.ts +33 -2
  17. package/e2e/generate-map.spec.ts +9 -3
  18. package/e2e/preprocess.test.ts +33 -0
  19. package/e2e/redirects-validation.spec.ts +61 -0
  20. package/e2e/search.test.ts +1 -1
  21. package/e2e/single-page.spec.ts +22 -0
  22. package/e2e/skip-html-extension.spec.ts +15 -0
  23. package/e2e/translation.spec.ts +21 -2
  24. package/fixtures/cliAdapter.ts +23 -0
  25. package/fixtures/globals.d.ts +4 -0
  26. package/fixtures/runners/binary.ts +4 -3
  27. package/fixtures/runners/types.ts +1 -2
  28. package/fixtures/utils/file.ts +53 -10
  29. package/fixtures/utils/test.ts +17 -8
  30. package/mocks/bundles/input/.yfm +13 -0
  31. package/mocks/bundles/input/index.md +12 -0
  32. package/mocks/bundles/input/page1.md +3 -0
  33. package/mocks/bundles/input/page2.md +5 -0
  34. package/mocks/bundles/input/toc.yaml +9 -0
  35. package/mocks/docs-viewer-interface/input/.yfm +6 -0
  36. package/mocks/docs-viewer-interface/input/index.md +3 -0
  37. package/mocks/docs-viewer-interface/input/toc.yaml +5 -0
  38. package/mocks/errors/extract-filtered-link/input/filtered.md +1 -0
  39. package/mocks/errors/extract-filtered-link/input/filtered2.md +0 -0
  40. package/mocks/errors/extract-filtered-link/input/index.md +7 -0
  41. package/mocks/errors/extract-filtered-link/input/toc.yaml +1 -0
  42. package/mocks/load-custom-resources/md2html-with-resources/input/page.md +9 -2
  43. package/mocks/load-custom-resources/md2md-with-resources/input/page.md +9 -2
  44. package/mocks/load-custom-resources/single-page-with-resources/input/page.md +9 -2
  45. package/mocks/metadata/md2html-with-metadata/input/page.md +8 -1
  46. package/mocks/metadata/md2md-with-metadata/input/page.md +7 -0
  47. package/mocks/preprocess/input/.yfm +1 -0
  48. package/mocks/preprocess/input/1.md +29 -0
  49. package/mocks/preprocess/input/_assets/1.png +0 -0
  50. package/mocks/preprocess/input/_assets/1.svg +0 -0
  51. package/mocks/preprocess/input/autotitle.md +23 -0
  52. package/mocks/preprocess/input/commented-include.md +3 -0
  53. package/mocks/preprocess/input/images.md +5 -0
  54. package/mocks/preprocess/input/included-item.md +12 -0
  55. package/mocks/preprocess/input/includes/deep.md +1 -0
  56. package/mocks/preprocess/input/includes/deepWithIndent.md +6 -0
  57. package/mocks/preprocess/input/includes/presets.yaml +2 -0
  58. package/mocks/preprocess/input/includes/sub/user.md +1 -0
  59. package/mocks/preprocess/input/includes/sub/userWithIndent.md +5 -0
  60. package/mocks/preprocess/input/includes/test.md +1 -0
  61. package/mocks/preprocess/input/includes/user.md +1 -0
  62. package/mocks/preprocess/input/includes.md +18 -0
  63. package/mocks/preprocess/input/latex.md +3 -0
  64. package/mocks/preprocess/input/mermaid.md +13 -0
  65. package/mocks/preprocess/input/presets.yaml +8 -0
  66. package/mocks/preprocess/input/sub/folder/item-1.md +7 -0
  67. package/mocks/preprocess/input/sub/toc.yaml +5 -0
  68. package/mocks/preprocess/input/toc-i.yaml +3 -0
  69. package/mocks/preprocess/input/toc.yaml +16 -0
  70. package/mocks/redirects-validation/extensions-deprecation/input/blah.md +0 -0
  71. package/mocks/redirects-validation/extensions-deprecation/input/redirects.yaml +5 -0
  72. package/mocks/redirects-validation/extensions-deprecation/input/toc.yaml +4 -0
  73. package/mocks/redirects-validation/invalid-regex/input/blah.md +0 -0
  74. package/mocks/redirects-validation/invalid-regex/input/redirects.yaml +3 -0
  75. package/mocks/redirects-validation/invalid-regex/input/toc.yaml +4 -0
  76. package/mocks/redirects-validation/malformed-redirect/input/blah.md +0 -0
  77. package/mocks/redirects-validation/malformed-redirect/input/redirects.yaml +6 -0
  78. package/mocks/redirects-validation/malformed-redirect/input/toc.yaml +4 -0
  79. package/mocks/redirects-validation/same-path/input/blah.md +0 -0
  80. package/mocks/redirects-validation/same-path/input/redirects.yaml +3 -0
  81. package/mocks/redirects-validation/same-path/input/toc.yaml +4 -0
  82. package/mocks/redirects-validation/unparseable/input/blah.md +0 -0
  83. package/mocks/redirects-validation/unparseable/input/redirects.yaml +11 -0
  84. package/mocks/redirects-validation/unparseable/input/toc.yaml +4 -0
  85. package/mocks/regression/input/.yfm +2 -0
  86. package/mocks/regression/input/autotitle.md +3 -0
  87. package/mocks/regression/input/images.md +2 -0
  88. package/mocks/regression/input/includes/deep.md +2 -0
  89. package/mocks/regression/input/includes/presets.yaml +1 -0
  90. package/mocks/regression/input/includes/tools.md +1 -0
  91. package/mocks/regression/input/includes.md +5 -0
  92. package/mocks/regression/input/merge/merge.md +2 -0
  93. package/mocks/regression/input/merge/presets.yaml +1 -0
  94. package/mocks/regression/input/merge/toc.yaml +2 -0
  95. package/mocks/regression/input/presets.yaml +1 -0
  96. package/mocks/regression/input/toc.yaml +2 -0
  97. package/mocks/search/input/.yfm +12 -0
  98. package/mocks/single-page/input/ru/index.yaml +9 -0
  99. package/mocks/single-page/input/ru/page.md +14 -0
  100. package/mocks/single-page/input/ru/project/config.md +1 -0
  101. package/mocks/single-page/input/ru/toc.yaml +7 -0
  102. package/mocks/skip-html-extension/input/.yfm +1 -0
  103. package/mocks/skip-html-extension/input/folder/index.md +1 -0
  104. package/mocks/skip-html-extension/input/index-test-html/index.md +4 -0
  105. package/mocks/skip-html-extension/input/index.md +6 -0
  106. package/mocks/skip-html-extension/input/page1.md +3 -0
  107. package/mocks/skip-html-extension/input/page2.md +6 -0
  108. package/mocks/skip-html-extension/input/toc.yaml +13 -0
  109. package/mocks/translation/dir-files/input/.yfm +6 -0
  110. package/mocks/translation/dir-files/input/ru/aboba.md +2 -4
  111. package/mocks/translation/dir-files/input/ru/nested/a1.md +3 -0
  112. package/mocks/translation/dir-files/input/ru/nested/folder1/a1.md +3 -0
  113. package/mocks/translation/dir-files/input/ru/nested/folder1/toc-i.yaml +3 -0
  114. package/mocks/translation/dir-files/input/ru/nested/syntax/base.md +2 -0
  115. package/mocks/translation/dir-files/input/ru/nested/toc.yaml +1 -0
  116. package/mocks/translation/dir-files/input/ru/no-var-page.md +3 -0
  117. package/mocks/translation/dir-files/input/ru/to-be-excluded.md +1 -0
  118. package/mocks/translation/dir-files/input/ru/toc.yaml +7 -1
  119. package/mocks/translation/openapi/input/toc.yaml +1 -1
  120. package/mocks/warning/unreachable-autotitle/input/index.md +1 -0
  121. package/mocks/warning/unreachable-autotitle/input/link.md +0 -0
  122. package/mocks/warning/unreachable-autotitle/input/toc.yaml +4 -0
  123. package/package.json +5 -5
@@ -0,0 +1,168 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`Check bundles > bundles list is correct > filelist 1`] = `
4
+ "[
5
+ ".yfm",
6
+ "_bundle/app-css-1",
7
+ "_bundle/app-js-2",
8
+ "_bundle/latex-extension.css",
9
+ "_bundle/latex-extension.js",
10
+ "_bundle/mermaid-extension.js",
11
+ "_bundle/page-constructor-extension.css",
12
+ "_bundle/page-constructor-extension.js",
13
+ "_bundle/search-async-0",
14
+ "_bundle/search-async-1",
15
+ "_bundle/search-css-0",
16
+ "_bundle/search-css-1",
17
+ "_bundle/search-css-2",
18
+ "_bundle/search-css-3",
19
+ "_bundle/search-css-4",
20
+ "_bundle/search-js-0",
21
+ "_bundle/search-js-1",
22
+ "_bundle/search-js-2",
23
+ "_search/api.js",
24
+ "_search/ru/hash-index.js",
25
+ "_search/ru/hash-registry.js",
26
+ "_search/ru/hash-resources.js",
27
+ "_search/ru/index.html",
28
+ "_search/ru/language.js",
29
+ "index.html",
30
+ "page1.html",
31
+ "page2.html",
32
+ "toc.js"
33
+ ]"
34
+ `;
35
+
36
+ exports[`Check bundles > bundles list is correct 1`] = `
37
+ "allowHTML: true
38
+
39
+ meta:
40
+ rootPath: http://127.0.0.1:5000/
41
+
42
+ interface:
43
+ toc-header: false
44
+ favicon-src: https://storage.yandexcloud.net/diplodoc-www-assets/favicon/favicon.ico
45
+
46
+ search:
47
+ provider: local
48
+ tolerance: 2
49
+ confidense: phrased
50
+ "
51
+ `;
52
+
53
+ exports[`Check bundles > bundles list is correct 2`] = `
54
+ "<!DOCTYPE html>
55
+ <html lang="ru" dir="ltr">
56
+ <head>
57
+ <meta charset="utf-8">
58
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
59
+ <base href="./" />
60
+ <title>Header | Skip html extension</title>
61
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
62
+ <meta name="availableLangs" content="en,ru">
63
+ <meta http-equiv="Content-Security-Policy" content="worker-src 'self';">
64
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
65
+ <link rel="icon" type="image/x-icon" href="https://storage.yandexcloud.net/diplodoc-www-assets/favicon/favicon.ico">
66
+
67
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-0"/>
68
+ <link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
69
+ </head>
70
+ <body class="g-root g-root_theme_light">
71
+ <div id="root"></div>
72
+ <script type="application/json" id="diplodoc-state">
73
+ {"data":{"leading":false,"html":"&lt;p&gt;Content&lt;/p&gt;/n&lt;p&gt;&lt;a href=\\"page1.html\\"&gt;Link 1&lt;/a&gt;&lt;br /&gt;/n&lt;a href=\\"page2.html\\"&gt;Link 2&lt;/a&gt;&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"availableLangs":["en","ru"],"vcsPath":"index.md","sourcePath":"index.md"},"headings":[],"title":"Header"},"router":{"pathname":"index","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc-header":false,"favicon-src":"https://storage.yandexcloud.net/diplodoc-www-assets/favicon/favicon.ico","toc":true,"search":true,"feedback":true},"search":{"provider":"local","tolerance":2,"confidense":"phrased","enabled":true,"api":"_search/api.js","link":"_search/ru/index.html"}}
74
+ </script>
75
+ <script type="application/javascript">
76
+ const data = document.querySelector('script#diplodoc-state');
77
+ window.__DATA__ = JSON.parse((function unescape(string) {
78
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
79
+ })(data.innerText));
80
+ window.STATIC_CONTENT = false;
81
+ </script>
82
+ <script type="application/javascript" defer src="toc.js"></script>
83
+ <script type="application/javascript" defer src="_search/ru/hash-resources.js"></script>
84
+ <script type="application/javascript" defer src="_bundle/search-js-1"></script>
85
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
86
+ <script type="application/javascript" defer src="_bundle/app-js-2"></script>
87
+
88
+ </body>
89
+ </html>"
90
+ `;
91
+
92
+ exports[`Check bundles > bundles list is correct 3`] = `
93
+ "<!DOCTYPE html>
94
+ <html lang="ru" dir="ltr">
95
+ <head>
96
+ <meta charset="utf-8">
97
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
98
+ <base href="./" />
99
+ <title>Page 1 | Skip html extension</title>
100
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
101
+ <meta http-equiv="Content-Security-Policy" content="worker-src 'self';">
102
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
103
+ <link rel="icon" type="image/x-icon" href="https://storage.yandexcloud.net/diplodoc-www-assets/favicon/favicon.ico">
104
+
105
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-0"/>
106
+ <link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
107
+ </head>
108
+ <body class="g-root g-root_theme_light">
109
+ <div id="root"></div>
110
+ <script type="application/json" id="diplodoc-state">
111
+ {"data":{"leading":false,"html":"&lt;p&gt;&lt;a href=\\"page2.html#hash\\"&gt;Link&lt;/a&gt;&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"vcsPath":"page1.md","sourcePath":"page1.md"},"headings":[],"title":"Page 1"},"router":{"pathname":"page1","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc-header":false,"favicon-src":"https://storage.yandexcloud.net/diplodoc-www-assets/favicon/favicon.ico","toc":true,"search":true,"feedback":true},"search":{"provider":"local","tolerance":2,"confidense":"phrased","enabled":true,"api":"_search/api.js","link":"_search/ru/index.html"}}
112
+ </script>
113
+ <script type="application/javascript">
114
+ const data = document.querySelector('script#diplodoc-state');
115
+ window.__DATA__ = JSON.parse((function unescape(string) {
116
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
117
+ })(data.innerText));
118
+ window.STATIC_CONTENT = false;
119
+ </script>
120
+ <script type="application/javascript" defer src="toc.js"></script>
121
+ <script type="application/javascript" defer src="_search/ru/hash-resources.js"></script>
122
+ <script type="application/javascript" defer src="_bundle/search-js-1"></script>
123
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
124
+ <script type="application/javascript" defer src="_bundle/app-js-2"></script>
125
+
126
+ </body>
127
+ </html>"
128
+ `;
129
+
130
+ exports[`Check bundles > bundles list is correct 4`] = `
131
+ "<!DOCTYPE html>
132
+ <html lang="ru" dir="ltr">
133
+ <head>
134
+ <meta charset="utf-8">
135
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
136
+ <base href="./" />
137
+ <title>Page 2 | Skip html extension</title>
138
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
139
+ <meta http-equiv="Content-Security-Policy" content="worker-src 'self';">
140
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
141
+ <link rel="icon" type="image/x-icon" href="https://storage.yandexcloud.net/diplodoc-www-assets/favicon/favicon.ico">
142
+
143
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-0"/>
144
+ <link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
145
+ </head>
146
+ <body class="g-root g-root_theme_light">
147
+ <div id="root"></div>
148
+ <script type="application/json" id="diplodoc-state">
149
+ {"data":{"leading":false,"html":"&lt;h2 id=\\"hash\\"&gt;&lt;a href=\\"page2.html#hash\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"&gt;&lt;span class=\\"visually-hidden\\" data-no-index=\\"true\\"&gt;hash&lt;/span&gt;&lt;/a&gt;hash&lt;/h2&gt;/n&lt;p&gt;&lt;a href=\\"https://example.com\\" target=\\"_blank\\" rel=\\"noreferrer noopener\\"&gt;External link&lt;/a&gt;&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"vcsPath":"page2.md","sourcePath":"page2.md"},"headings":[{"title":"hash","href":"page2.html#hash","level":2}],"title":"Page 2"},"router":{"pathname":"page2","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc-header":false,"favicon-src":"https://storage.yandexcloud.net/diplodoc-www-assets/favicon/favicon.ico","toc":true,"search":true,"feedback":true},"search":{"provider":"local","tolerance":2,"confidense":"phrased","enabled":true,"api":"_search/api.js","link":"_search/ru/index.html"}}
150
+ </script>
151
+ <script type="application/javascript">
152
+ const data = document.querySelector('script#diplodoc-state');
153
+ window.__DATA__ = JSON.parse((function unescape(string) {
154
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
155
+ })(data.innerText));
156
+ window.STATIC_CONTENT = false;
157
+ </script>
158
+ <script type="application/javascript" defer src="toc.js"></script>
159
+ <script type="application/javascript" defer src="_search/ru/hash-resources.js"></script>
160
+ <script type="application/javascript" defer src="_bundle/search-js-1"></script>
161
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
162
+ <script type="application/javascript" defer src="_bundle/app-js-2"></script>
163
+
164
+ </body>
165
+ </html>"
166
+ `;
167
+
168
+ exports[`Check bundles > bundles list is correct 5`] = `"window.__DATA__.data.toc = {"title":"Skip html extension","href":"index.html","items":[{"name":"Title 1","href":"page1.html","id":"UUID"},{"name":"Title 2","href":"page2.html","id":"UUID"}],"path":"toc.yaml","id":"UUID"};"`;
@@ -13,6 +13,76 @@ exports[`Generate map for > project with external links in toc 1`] = `
13
13
  }"
14
14
  `;
15
15
 
16
+ exports[`Generate map for > project with external links in toc 2`] = `
17
+ {
18
+ "fileTrie": {
19
+ "tocMapping": {
20
+ "t0": "ru/toc.yaml",
21
+ },
22
+ "trie": {
23
+ "ru": {
24
+ "children": {
25
+ "folder1": {
26
+ "children": {
27
+ "a1": {
28
+ "file": {
29
+ "ext": ".md",
30
+ "toc": "t0",
31
+ },
32
+ },
33
+ "folder2": {
34
+ "children": {
35
+ "a1": {
36
+ "file": {
37
+ "ext": ".md",
38
+ "toc": "t0",
39
+ },
40
+ },
41
+ },
42
+ },
43
+ },
44
+ },
45
+ "index": {
46
+ "file": {
47
+ "ext": ".md",
48
+ "toc": "t0",
49
+ },
50
+ },
51
+ "plugins": {
52
+ "children": {
53
+ "index": {
54
+ "file": {
55
+ "ext": ".md",
56
+ "toc": "t0",
57
+ },
58
+ },
59
+ },
60
+ },
61
+ "project": {
62
+ "children": {
63
+ "index": {
64
+ "file": {
65
+ "ext": ".md",
66
+ "toc": "t0",
67
+ },
68
+ },
69
+ },
70
+ },
71
+ "settings": {
72
+ "file": {
73
+ "ext": ".md",
74
+ "toc": "t0",
75
+ },
76
+ },
77
+ },
78
+ },
79
+ },
80
+ },
81
+ "redirects": {},
82
+ "yfmConfig": {},
83
+ }
84
+ `;
85
+
16
86
  exports[`Generate map for > project with multiple language 1`] = `
17
87
  "{
18
88
  "files": [
@@ -32,6 +102,117 @@ exports[`Generate map for > project with multiple language 1`] = `
32
102
  }"
33
103
  `;
34
104
 
105
+ exports[`Generate map for > project with multiple language 2`] = `
106
+ {
107
+ "fileTrie": {
108
+ "tocMapping": {
109
+ "t0": "en/toc.yaml",
110
+ "t1": "ru/toc.yaml",
111
+ },
112
+ "trie": {
113
+ "en": {
114
+ "children": {
115
+ "index": {
116
+ "file": {
117
+ "ext": ".md",
118
+ "toc": "t0",
119
+ },
120
+ },
121
+ "plugins": {
122
+ "children": {
123
+ "import": {
124
+ "file": {
125
+ "ext": ".md",
126
+ "toc": "t0",
127
+ },
128
+ },
129
+ "index": {
130
+ "file": {
131
+ "ext": ".md",
132
+ "toc": "t0",
133
+ },
134
+ },
135
+ },
136
+ },
137
+ "project": {
138
+ "children": {
139
+ "config": {
140
+ "file": {
141
+ "ext": ".md",
142
+ "toc": "t0",
143
+ },
144
+ },
145
+ "index": {
146
+ "file": {
147
+ "ext": ".md",
148
+ "toc": "t0",
149
+ },
150
+ },
151
+ },
152
+ },
153
+ "settings": {
154
+ "file": {
155
+ "ext": ".md",
156
+ "toc": "t0",
157
+ },
158
+ },
159
+ },
160
+ },
161
+ "ru": {
162
+ "children": {
163
+ "index": {
164
+ "file": {
165
+ "ext": ".md",
166
+ "toc": "t1",
167
+ },
168
+ },
169
+ "plugins": {
170
+ "children": {
171
+ "import": {
172
+ "file": {
173
+ "ext": ".md",
174
+ "toc": "t1",
175
+ },
176
+ },
177
+ "index": {
178
+ "file": {
179
+ "ext": ".md",
180
+ "toc": "t1",
181
+ },
182
+ },
183
+ },
184
+ },
185
+ "project": {
186
+ "children": {
187
+ "config": {
188
+ "file": {
189
+ "ext": ".md",
190
+ "toc": "t1",
191
+ },
192
+ },
193
+ "index": {
194
+ "file": {
195
+ "ext": ".md",
196
+ "toc": "t1",
197
+ },
198
+ },
199
+ },
200
+ },
201
+ "settings": {
202
+ "file": {
203
+ "ext": ".md",
204
+ "toc": "t1",
205
+ },
206
+ },
207
+ },
208
+ },
209
+ },
210
+ },
211
+ "redirects": {},
212
+ "yfmConfig": {},
213
+ }
214
+ `;
215
+
35
216
  exports[`Generate map for > project with single language and toc include - only md2html 1`] = `
36
217
  "{
37
218
  "files": [
@@ -47,6 +228,88 @@ exports[`Generate map for > project with single language and toc include - only
47
228
  }"
48
229
  `;
49
230
 
231
+ exports[`Generate map for > project with single language and toc include - only md2html 2`] = `
232
+ {
233
+ "fileTrie": {
234
+ "tocMapping": {
235
+ "t0": "ru/toc.yaml",
236
+ },
237
+ "trie": {
238
+ "ru": {
239
+ "children": {
240
+ "folder1": {
241
+ "children": {
242
+ "a1": {
243
+ "file": {
244
+ "ext": ".md",
245
+ "toc": "t0",
246
+ },
247
+ },
248
+ "folder2": {
249
+ "children": {
250
+ "a1": {
251
+ "file": {
252
+ "ext": ".md",
253
+ "toc": "t0",
254
+ },
255
+ },
256
+ },
257
+ },
258
+ },
259
+ },
260
+ "index": {
261
+ "file": {
262
+ "ext": ".md",
263
+ "toc": "t0",
264
+ },
265
+ },
266
+ "plugins": {
267
+ "children": {
268
+ "import": {
269
+ "file": {
270
+ "ext": ".md",
271
+ "toc": "t0",
272
+ },
273
+ },
274
+ "index": {
275
+ "file": {
276
+ "ext": ".md",
277
+ "toc": "t0",
278
+ },
279
+ },
280
+ },
281
+ },
282
+ "project": {
283
+ "children": {
284
+ "config": {
285
+ "file": {
286
+ "ext": ".md",
287
+ "toc": "t0",
288
+ },
289
+ },
290
+ "index": {
291
+ "file": {
292
+ "ext": ".md",
293
+ "toc": "t0",
294
+ },
295
+ },
296
+ },
297
+ },
298
+ "settings": {
299
+ "file": {
300
+ "ext": ".md",
301
+ "toc": "t0",
302
+ },
303
+ },
304
+ },
305
+ },
306
+ },
307
+ },
308
+ "redirects": {},
309
+ "yfmConfig": {},
310
+ }
311
+ `;
312
+
50
313
  exports[`Generate map for > project with single language and toc include 1`] = `
51
314
  "{
52
315
  "files": [
@@ -61,3 +324,85 @@ exports[`Generate map for > project with single language and toc include 1`] = `
61
324
  ]
62
325
  }"
63
326
  `;
327
+
328
+ exports[`Generate map for > project with single language and toc include 2`] = `
329
+ {
330
+ "fileTrie": {
331
+ "tocMapping": {
332
+ "t0": "ru/toc.yaml",
333
+ },
334
+ "trie": {
335
+ "ru": {
336
+ "children": {
337
+ "folder1": {
338
+ "children": {
339
+ "a1": {
340
+ "file": {
341
+ "ext": ".md",
342
+ "toc": "t0",
343
+ },
344
+ },
345
+ "folder2": {
346
+ "children": {
347
+ "a1": {
348
+ "file": {
349
+ "ext": ".md",
350
+ "toc": "t0",
351
+ },
352
+ },
353
+ },
354
+ },
355
+ },
356
+ },
357
+ "index": {
358
+ "file": {
359
+ "ext": ".md",
360
+ "toc": "t0",
361
+ },
362
+ },
363
+ "plugins": {
364
+ "children": {
365
+ "import": {
366
+ "file": {
367
+ "ext": ".md",
368
+ "toc": "t0",
369
+ },
370
+ },
371
+ "index": {
372
+ "file": {
373
+ "ext": ".md",
374
+ "toc": "t0",
375
+ },
376
+ },
377
+ },
378
+ },
379
+ "project": {
380
+ "children": {
381
+ "config": {
382
+ "file": {
383
+ "ext": ".md",
384
+ "toc": "t0",
385
+ },
386
+ },
387
+ "index": {
388
+ "file": {
389
+ "ext": ".md",
390
+ "toc": "t0",
391
+ },
392
+ },
393
+ },
394
+ },
395
+ "settings": {
396
+ "file": {
397
+ "ext": ".md",
398
+ "toc": "t0",
399
+ },
400
+ },
401
+ },
402
+ },
403
+ },
404
+ },
405
+ "redirects": {},
406
+ "yfmConfig": {},
407
+ }
408
+ `;