@diplodoc/cli-tests 0.0.0-rc-resolve-codeblock-202509151421 → 0.0.0-rc-disable-resolve-codeblock-17941220955

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 (31) hide show
  1. package/e2e/__snapshots__/alternates.test.ts.snap +905 -0
  2. package/e2e/__snapshots__/bundles.spec.ts.snap +6 -0
  3. package/e2e/__snapshots__/include-toc.test.ts.snap +3 -0
  4. package/e2e/__snapshots__/preprocess.test.ts.snap +606 -4
  5. package/e2e/__snapshots__/regression.test.ts.snap +2 -0
  6. package/e2e/__snapshots__/rtl.spec.ts.snap +16 -4
  7. package/e2e/__snapshots__/single-page.spec.ts.snap +9 -3
  8. package/e2e/__snapshots__/translation.spec.ts.snap +14 -6
  9. package/e2e/alternates.test.ts +34 -0
  10. package/e2e/preprocess.test.ts +4 -0
  11. package/e2e/translation.spec.ts +1 -1
  12. package/fixtures/utils/test.ts +2 -0
  13. package/mocks/alternates/input/.yfm +1 -0
  14. package/mocks/alternates/input/az/about.md +3 -0
  15. package/mocks/alternates/input/az/deep/test.md +3 -0
  16. package/mocks/alternates/input/az/index.yaml +3 -0
  17. package/mocks/alternates/input/az/toc.yaml +6 -0
  18. package/mocks/alternates/input/en/about.md +3 -0
  19. package/mocks/alternates/input/en/deep/test.md +3 -0
  20. package/mocks/alternates/input/en/index.yaml +3 -0
  21. package/mocks/alternates/input/en/toc.yaml +6 -0
  22. package/mocks/alternates/input/ru/about.md +8 -0
  23. package/mocks/alternates/input/ru/deep/test.md +3 -0
  24. package/mocks/alternates/input/ru/index.yaml +3 -0
  25. package/mocks/alternates/input/ru/toc.yaml +6 -0
  26. package/mocks/preprocess/input/_assets/1.svg +15 -0
  27. package/mocks/preprocess/input/autotitle.md +13 -0
  28. package/mocks/preprocess/input/images.md +92 -1
  29. package/mocks/translation/dir-files/input/ru/nested/toc.yaml +3 -3
  30. package/mocks/translation/dir-files/input/ru/nested/use_filtered_above.md +4 -0
  31. package/package.json +1 -1
@@ -767,6 +767,8 @@ exports[`Regression > internal 31`] = `
767
767
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
768
768
  <base href="./" />
769
769
  <title>Redirect to d.md</title>
770
+
771
+
770
772
  <meta http-equiv="refresh" content="0; url=d.md">
771
773
 
772
774
  <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
@@ -92,13 +92,16 @@ exports[`Generate html document with correct lang and dir attributes. Load corre
92
92
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
93
93
  <base href="../" />
94
94
  <title>Documentation | Documentation</title>
95
+ <link rel="canonical" href="ar/index.html">
96
+ <link rel="alternate" href="en/index.html" hreflang="en" />
97
+ <link rel="alternate" href="ar/index.html" hreflang="ar" />
95
98
  <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
96
99
  <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
97
100
  </head>
98
101
  <body class="g-root g-root_theme_light">
99
102
  <div id="root"></div>
100
103
  <script type="application/json" id="diplodoc-state">
101
- {"data":{"leading":true,"data":{"title":"Documentation","links":[{"title":"Documentation","href":"ar/page.html"}]},"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"vcsPath":"ar/index.yaml","sourcePath":"ar/index.yaml"},"title":"Documentation"},"router":{"pathname":"ar/index","depth":2,"base":"../"},"lang":"ar","langs":["ar","en"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
104
+ {"data":{"leading":true,"data":{"title":"Documentation","links":[{"title":"Documentation","href":"ar/page.html"}]},"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"alternate":[{"href":"en/index.html","hreflang":"en"},{"href":"ar/index.html","hreflang":"ar"}],"canonical":"ar/index.html","vcsPath":"ar/index.yaml","sourcePath":"ar/index.yaml"},"title":"Documentation"},"router":{"pathname":"ar/index","depth":2,"base":"../"},"lang":"ar","langs":["ar","en"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
102
105
  </script>
103
106
  <script type="application/javascript">
104
107
  const data = document.querySelector('script#diplodoc-state');
@@ -120,13 +123,16 @@ exports[`Generate html document with correct lang and dir attributes. Load corre
120
123
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
121
124
  <base href="../" />
122
125
  <title>Documentation</title>
126
+ <link rel="canonical" href="ar/page.html">
127
+ <link rel="alternate" href="en/page.html" hreflang="en" />
128
+ <link rel="alternate" href="ar/page.html" hreflang="ar" />
123
129
  <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
124
130
  <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
125
131
  </head>
126
132
  <body class="g-root g-root_theme_light">
127
133
  <div id="root"></div>
128
134
  <script type="application/json" id="diplodoc-state">
129
- {"data":{"leading":false,"html":"&lt;p&gt;توثيق&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"vcsPath":"ar/page.md","sourcePath":"ar/page.md"},"headings":[],"title":""},"router":{"pathname":"ar/page","depth":2,"base":"../"},"lang":"ar","langs":["ar","en"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
135
+ {"data":{"leading":false,"html":"&lt;p&gt;توثيق&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"alternate":[{"href":"en/page.html","hreflang":"en"},{"href":"ar/page.html","hreflang":"ar"}],"canonical":"ar/page.html","vcsPath":"ar/page.md","sourcePath":"ar/page.md"},"headings":[],"title":""},"router":{"pathname":"ar/page","depth":2,"base":"../"},"lang":"ar","langs":["ar","en"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
130
136
  </script>
131
137
  <script type="application/javascript">
132
138
  const data = document.querySelector('script#diplodoc-state');
@@ -150,13 +156,16 @@ exports[`Generate html document with correct lang and dir attributes. Load corre
150
156
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
151
157
  <base href="../" />
152
158
  <title>Documentation | Documentation</title>
159
+ <link rel="canonical" href="en/index.html">
160
+ <link rel="alternate" href="en/index.html" hreflang="en" />
161
+ <link rel="alternate" href="ar/index.html" hreflang="ar" />
153
162
  <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
154
163
  <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
155
164
  </head>
156
165
  <body class="g-root g-root_theme_light">
157
166
  <div id="root"></div>
158
167
  <script type="application/json" id="diplodoc-state">
159
- {"data":{"leading":true,"data":{"title":"Documentation","description":"","links":[{"title":"Getting started with Documentation","description":"This guide will show you the basics of working with Documentation","href":"en/page.html"}]},"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"title":"Documentation","noIndex":true,"vcsPath":"en/index.yaml","sourcePath":"en/index.yaml"},"title":"Documentation"},"router":{"pathname":"en/index","depth":2,"base":"../"},"lang":"en","langs":["ar","en"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
168
+ {"data":{"leading":true,"data":{"title":"Documentation","description":"","links":[{"title":"Getting started with Documentation","description":"This guide will show you the basics of working with Documentation","href":"en/page.html"}]},"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"alternate":[{"href":"en/index.html","hreflang":"en"},{"href":"ar/index.html","hreflang":"ar"}],"canonical":"en/index.html","title":"Documentation","noIndex":true,"vcsPath":"en/index.yaml","sourcePath":"en/index.yaml"},"title":"Documentation"},"router":{"pathname":"en/index","depth":2,"base":"../"},"lang":"en","langs":["ar","en"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
160
169
  </script>
161
170
  <script type="application/javascript">
162
171
  const data = document.querySelector('script#diplodoc-state');
@@ -178,6 +187,9 @@ exports[`Generate html document with correct lang and dir attributes. Load corre
178
187
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
179
188
  <base href="../" />
180
189
  <title>Documentation</title>
190
+ <link rel="canonical" href="en/page.html">
191
+ <link rel="alternate" href="en/page.html" hreflang="en" />
192
+ <link rel="alternate" href="ar/page.html" hreflang="ar" />
181
193
  <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
182
194
  <meta name="yfm" content="builder">
183
195
  <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
@@ -185,7 +197,7 @@ exports[`Generate html document with correct lang and dir attributes. Load corre
185
197
  <body class="g-root g-root_theme_light">
186
198
  <div id="root"></div>
187
199
  <script type="application/json" id="diplodoc-state">
188
- {"data":{"leading":false,"html":"&lt;p&gt;Lorem&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"},{"name":"yfm","content":"builder"}],"vcsPath":"en/page.md","sourcePath":"en/page.md"},"headings":[],"title":""},"router":{"pathname":"en/page","depth":2,"base":"../"},"lang":"en","langs":["ar","en"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
200
+ {"data":{"leading":false,"html":"&lt;p&gt;Lorem&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"},{"name":"yfm","content":"builder"}],"alternate":[{"href":"en/page.html","hreflang":"en"},{"href":"ar/page.html","hreflang":"ar"}],"canonical":"en/page.html","vcsPath":"en/page.md","sourcePath":"en/page.md"},"headings":[],"title":""},"router":{"pathname":"en/page","depth":2,"base":"../"},"lang":"en","langs":["ar","en"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
189
201
  </script>
190
202
  <script type="application/javascript">
191
203
  const data = document.querySelector('script#diplodoc-state');
@@ -41,13 +41,15 @@ exports[`Single page mode > simple md2html single page with lang dirs 2`] = `
41
41
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
42
42
  <base href="../" />
43
43
  <title>Documentation | Documentation</title>
44
+ <link rel="canonical" href="ru/index.html">
45
+ <link rel="alternate" href="ru/index.html" hreflang="ru" />
44
46
  <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
45
47
  <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
46
48
  </head>
47
49
  <body class="g-root g-root_theme_light">
48
50
  <div id="root"></div>
49
51
  <script type="application/json" id="diplodoc-state">
50
- {"data":{"leading":true,"data":{"title":"Documentation","description":"","links":[{"title":"Getting started with Documentation","description":"This guide will show you the basics of working with Documentation","href":"ru/page.html"}]},"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"title":"Documentation","noIndex":true,"vcsPath":"ru/index.yaml","sourcePath":"ru/index.yaml"},"title":"Documentation"},"router":{"pathname":"ru/index","depth":2,"base":"../"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
52
+ {"data":{"leading":true,"data":{"title":"Documentation","description":"","links":[{"title":"Getting started with Documentation","description":"This guide will show you the basics of working with Documentation","href":"ru/page.html"}]},"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"alternate":[{"href":"ru/index.html","hreflang":"ru"}],"canonical":"ru/index.html","title":"Documentation","noIndex":true,"vcsPath":"ru/index.yaml","sourcePath":"ru/index.yaml"},"title":"Documentation"},"router":{"pathname":"ru/index","depth":2,"base":"../"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
51
53
  </script>
52
54
  <script type="application/javascript">
53
55
  const data = document.querySelector('script#diplodoc-state');
@@ -69,6 +71,8 @@ exports[`Single page mode > simple md2html single page with lang dirs 3`] = `
69
71
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
70
72
  <base href="../" />
71
73
  <title>Page Title | Documentation</title>
74
+ <link rel="canonical" href="ru/page.html">
75
+ <link rel="alternate" href="ru/page.html" hreflang="ru" />
72
76
  <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
73
77
  <meta name="yfm" content="builder in page">
74
78
  <meta name="description" content="Some test description">
@@ -78,7 +82,7 @@ exports[`Single page mode > simple md2html single page with lang dirs 3`] = `
78
82
  <body class="g-root g-root_theme_light">
79
83
  <div id="root"></div>
80
84
  <script type="application/json" id="diplodoc-state">
81
- {"data":{"leading":false,"html":"&lt;p&gt;Lorem&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"},{"name":"yfm","content":"builder in page"},{"name":"description","content":"Some test description"}],"title":"Page Title","description":"Some test description","interface":{"toc":false,"favicon-src":"/favicon.ico"},"vcsPath":"ru/page.md","sourcePath":"ru/page.md"},"headings":[],"title":"Page Title"},"router":{"pathname":"ru/page","depth":2,"base":"../"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":false,"search":true,"feedback":true,"favicon-src":"/favicon.ico"}}
85
+ {"data":{"leading":false,"html":"&lt;p&gt;Lorem&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"},{"name":"yfm","content":"builder in page"},{"name":"description","content":"Some test description"}],"alternate":[{"href":"ru/page.html","hreflang":"ru"}],"canonical":"ru/page.html","title":"Page Title","description":"Some test description","interface":{"toc":false,"favicon-src":"/favicon.ico"},"vcsPath":"ru/page.md","sourcePath":"ru/page.md"},"headings":[],"title":"Page Title"},"router":{"pathname":"ru/page","depth":2,"base":"../"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":false,"search":true,"feedback":true,"favicon-src":"/favicon.ico"}}
82
86
  </script>
83
87
  <script type="application/javascript">
84
88
  const data = document.querySelector('script#diplodoc-state');
@@ -100,13 +104,15 @@ exports[`Single page mode > simple md2html single page with lang dirs 4`] = `
100
104
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
101
105
  <base href="../../" />
102
106
  <title>Documentation</title>
107
+ <link rel="canonical" href="ru/project/config.html">
108
+ <link rel="alternate" href="ru/project/config.html" hreflang="ru" />
103
109
  <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
104
110
  <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
105
111
  </head>
106
112
  <body class="g-root g-root_theme_light">
107
113
  <div id="root"></div>
108
114
  <script type="application/json" id="diplodoc-state">
109
- {"data":{"leading":false,"html":"&lt;p&gt;Lorem&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"vcsPath":"ru/project/config.md","sourcePath":"ru/project/config.md"},"headings":[],"title":""},"router":{"pathname":"ru/project/config","depth":3,"base":"../../"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
115
+ {"data":{"leading":false,"html":"&lt;p&gt;Lorem&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"alternate":[{"href":"ru/project/config.html","hreflang":"ru"}],"canonical":"ru/project/config.html","vcsPath":"ru/project/config.md","sourcePath":"ru/project/config.md"},"headings":[],"title":""},"router":{"pathname":"ru/project/config","depth":3,"base":"../../"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
110
116
  </script>
111
117
  <script type="application/javascript">
112
118
  const data = document.querySelector('script#diplodoc-state');
@@ -662,6 +662,8 @@ exports[`Translate command > do not filter files on extract > filelist 1`] = `
662
662
  "es/nested/syntax/lists.md.xliff",
663
663
  "es/nested/toc.yaml.skl",
664
664
  "es/nested/toc.yaml.xliff",
665
+ "es/nested/use_filtered_above.md.skl",
666
+ "es/nested/use_filtered_above.md.xliff",
665
667
  "es/no-var-page.md.skl",
666
668
  "es/no-var-page.md.xliff",
667
669
  "es/not-in-toc.md.skl",
@@ -1186,16 +1188,18 @@ exports[`Translate command > filter files on extract > filelist 1`] = `
1186
1188
  "es/index.md.xliff",
1187
1189
  "es/nested/a1.md.skl",
1188
1190
  "es/nested/a1.md.xliff",
1189
- "es/nested/index-yfm.md.skl",
1190
- "es/nested/index-yfm.md.xliff",
1191
1191
  "es/nested/index.yaml.skl",
1192
1192
  "es/nested/index.yaml.xliff",
1193
1193
  "es/nested/syntax/base.md.skl",
1194
1194
  "es/nested/syntax/base.md.xliff",
1195
+ "es/nested/syntax/index.md.skl",
1196
+ "es/nested/syntax/index.md.xliff",
1195
1197
  "es/nested/syntax/lists.md.skl",
1196
1198
  "es/nested/syntax/lists.md.xliff",
1197
1199
  "es/nested/toc.yaml.skl",
1198
1200
  "es/nested/toc.yaml.xliff",
1201
+ "es/nested/use_filtered_above.md.skl",
1202
+ "es/nested/use_filtered_above.md.xliff",
1199
1203
  "es/no-var-page.md.skl",
1200
1204
  "es/no-var-page.md.xliff",
1201
1205
  "es/to-be-excluded.md.skl",
@@ -1215,16 +1219,18 @@ exports[`Translate command > filter files on extract with extra exclude option >
1215
1219
  "es/index.md.xliff",
1216
1220
  "es/nested/a1.md.skl",
1217
1221
  "es/nested/a1.md.xliff",
1218
- "es/nested/index-yfm.md.skl",
1219
- "es/nested/index-yfm.md.xliff",
1220
1222
  "es/nested/index.yaml.skl",
1221
1223
  "es/nested/index.yaml.xliff",
1222
1224
  "es/nested/syntax/base.md.skl",
1223
1225
  "es/nested/syntax/base.md.xliff",
1226
+ "es/nested/syntax/index.md.skl",
1227
+ "es/nested/syntax/index.md.xliff",
1224
1228
  "es/nested/syntax/lists.md.skl",
1225
1229
  "es/nested/syntax/lists.md.xliff",
1226
1230
  "es/nested/toc.yaml.skl",
1227
1231
  "es/nested/toc.yaml.xliff",
1232
+ "es/nested/use_filtered_above.md.skl",
1233
+ "es/nested/use_filtered_above.md.xliff",
1228
1234
  "es/no-var-page.md.skl",
1229
1235
  "es/no-var-page.md.xliff",
1230
1236
  "es/toc.yaml.skl",
@@ -1244,16 +1250,18 @@ exports[`Translate command > filter files on extract with extra vars option > fi
1244
1250
  "es/index.md.xliff",
1245
1251
  "es/nested/a1.md.skl",
1246
1252
  "es/nested/a1.md.xliff",
1247
- "es/nested/index-yfm.md.skl",
1248
- "es/nested/index-yfm.md.xliff",
1249
1253
  "es/nested/index.yaml.skl",
1250
1254
  "es/nested/index.yaml.xliff",
1251
1255
  "es/nested/syntax/base.md.skl",
1252
1256
  "es/nested/syntax/base.md.xliff",
1257
+ "es/nested/syntax/index.md.skl",
1258
+ "es/nested/syntax/index.md.xliff",
1253
1259
  "es/nested/syntax/lists.md.skl",
1254
1260
  "es/nested/syntax/lists.md.xliff",
1255
1261
  "es/nested/toc.yaml.skl",
1256
1262
  "es/nested/toc.yaml.xliff",
1263
+ "es/nested/use_filtered_above.md.skl",
1264
+ "es/nested/use_filtered_above.md.xliff",
1257
1265
  "es/no-var-page.md.skl",
1258
1266
  "es/no-var-page.md.xliff",
1259
1267
  "es/to-be-excluded.md.skl",
@@ -0,0 +1,34 @@
1
+ import {describe, it} from 'vitest';
2
+ import {TestAdapter, compareDirectories, getTestPaths} from '../fixtures';
3
+
4
+ describe('Alternates', () => {
5
+ it('skip-html-extension', async () => {
6
+ const {inputPath, outputPath} = getTestPaths('mocks/alternates');
7
+
8
+ await TestAdapter.testBuildPass(inputPath, outputPath, {
9
+ md2md: false,
10
+ md2html: true,
11
+ args: '-j2 --skip-html-extension',
12
+ });
13
+
14
+ await compareDirectories(outputPath);
15
+ });
16
+
17
+ it('internal', async () => {
18
+ const {inputPath, outputPath} = getTestPaths('mocks/alternates');
19
+
20
+ await TestAdapter.testBuildPass(inputPath, outputPath, {
21
+ md2md: true,
22
+ md2html: false,
23
+ args: '-j2',
24
+ });
25
+ await TestAdapter.testBuildPass(outputPath, outputPath + '-html', {
26
+ md2md: false,
27
+ md2html: true,
28
+ args: '-j2',
29
+ });
30
+
31
+ await compareDirectories(outputPath);
32
+ await compareDirectories(outputPath + '-html');
33
+ });
34
+ });
@@ -29,5 +29,9 @@ describe('Preprocess', () => {
29
29
 
30
30
  generateFilesYamlTestTemplate('HashIncludes=true,Autotitles=true', 'mocks/preprocess');
31
31
 
32
+ generateFilesYamlTestTemplate('HashIncludes=true,Autotitles=true,Svg=true', 'mocks/preprocess', [
33
+ '--merge-svg'
34
+ ]);
35
+
32
36
  // generateFilesYamlTestTemplate('Nested toc restricted access', 'mocks/preprocess/test3');
33
37
  });
@@ -37,7 +37,7 @@ const buildFilesYamlTestTemplate = (
37
37
  ) => {
38
38
  test(testTitle, async () => {
39
39
  const {inputPath, outputPath} = getTestPaths(testRootPath);
40
- const {md2md, md2html} =buildProps;
40
+ const {md2md, md2html} = buildProps;
41
41
 
42
42
  await TestAdapter.testBuildPass(inputPath, outputPath, {md2html, md2md});
43
43
 
@@ -1,3 +1,4 @@
1
+
1
2
  import assets from '@diplodoc/cli/manifest';
2
3
 
3
4
  export function platformless(text: string): string {
@@ -25,6 +26,7 @@ export function platformless(text: string): string {
25
26
  export function hashless(text: string): string {
26
27
  return text
27
28
  .replace(/-[a-z0-9]{12}\./g, '-hash.')
29
+ .replace(/rnd-[a-z0-9]{1,8}__/g, 'rnd-hash__')
28
30
  .replace(/(\/|\\)[a-z0-9]{12,13}-(index|registry|resources)\./g, '/hash-$2.');
29
31
  }
30
32
 
@@ -0,0 +1 @@
1
+ langs: ['ru', 'en', 'az']
@@ -0,0 +1,3 @@
1
+ # About
2
+
3
+ Content
@@ -0,0 +1,3 @@
1
+ # Test
2
+
3
+ Content
@@ -0,0 +1,3 @@
1
+ links:
2
+ - url: ./about
3
+ name: About
@@ -0,0 +1,6 @@
1
+ href: index.yaml
2
+ items:
3
+ - href: about.md
4
+ name: About
5
+ - href: deep/test.md
6
+ name: Test
@@ -0,0 +1,3 @@
1
+ # About
2
+
3
+ Content
@@ -0,0 +1,3 @@
1
+ # Test
2
+
3
+ Content
@@ -0,0 +1,3 @@
1
+ links:
2
+ - url: ./about
3
+ name: About
@@ -0,0 +1,6 @@
1
+ href: index.yaml
2
+ items:
3
+ - href: about.md
4
+ name: About
5
+ - href: deep/test.md
6
+ name: Test
@@ -0,0 +1,8 @@
1
+ ---
2
+ alternate:
3
+ - https://my-other-site.com/about
4
+ ---
5
+
6
+ # About
7
+
8
+ Content
@@ -0,0 +1,3 @@
1
+ # Test
2
+
3
+ Content
@@ -0,0 +1,3 @@
1
+ links:
2
+ - url: ./about
3
+ name: About
@@ -0,0 +1,6 @@
1
+ href: index.yaml
2
+ items:
3
+ - href: about.md
4
+ name: About
5
+ - href: deep/test.md
6
+ name: Test
@@ -0,0 +1,15 @@
1
+ <svg width="20px" height="20px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" id="search" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
+ <g id="search_1_">
3
+ <linearGradient gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="57.9473" x2="407.9511" y1="351.4531" y2="149.3783">
4
+ <stop offset="0" stop-color="#F14D5C"/>
5
+ <stop offset="0.1309" stop-color="#F05454"/>
6
+ <stop offset="0.3346" stop-color="#3bf488"/>
7
+ <stop offset="0.3492" stop-color="#ED683C"/>
8
+ <stop offset="0.714" stop-color="#1e15a3"/>
9
+ <stop offset="1" stop-color="#FDC70C"/>
10
+ </linearGradient>
11
+ <path d="M300.766,87.509c-33.056,0-64.133,12.873-87.507,36.246c-23.374,23.374-36.247,54.451-36.247,87.507 c0,24.234,6.927,47.4,19.83,67.252l-12.669,12.669c0,0.001-0.001,0.001-0.001,0.001l-90.664,90.665 c-8.353,8.354-7.88,22.418,1.055,31.353l4.261,4.262c4.669,4.668,10.736,7.028,16.658,7.028c5.417,0,10.713-1.976,14.703-5.966 l15.405-15.405l75.259-75.259l12.671-12.672c19.85,12.9,43.014,19.826,67.246,19.826c33.056,0,64.133-12.873,87.506-36.247 c48.252-48.251,48.252-126.762,0-175.014C364.898,100.382,333.821,87.509,300.766,87.509z M138.518,396.049 c-4.454,4.453-12.178,3.979-17.219-1.063l-4.261-4.262c-5.036-5.035-5.509-12.756-1.055-17.21l71.38-71.38 c3.284,4.164,6.834,8.16,10.601,11.926c3.766,3.766,7.764,7.318,11.935,10.607L138.518,396.049z M105.894,410.391l-4.261-4.26 c-5.036-5.036-5.509-12.757-1.055-17.211l2.902-2.902c0.936,4.27,3.101,8.393,6.486,11.779l4.261,4.26 c3.392,3.393,7.523,5.549,11.799,6.483l-2.914,2.914C118.658,415.908,110.934,415.432,105.894,410.391z M213.788,320.779 c0.002-0.003,0.005-0.006,0.007-0.008l0,0L213.788,320.779z M217.033,317.534c-4.201-3.248-8.229-6.775-11.998-10.544 c-3.771-3.771-7.295-7.797-10.537-11.99l8.214-8.214c3.233,4.181,6.749,8.185,10.547,11.982c3.8,3.8,7.806,7.317,11.989,10.552 L217.033,317.534z M381.201,291.697c-21.485,21.485-50.052,33.318-80.436,33.318c-30.385,0-58.951-11.833-80.436-33.318 c-21.485-21.484-33.318-50.051-33.318-80.436s11.833-58.95,33.318-80.436c21.485-21.485,50.051-33.317,80.436-33.317 c30.384,0,58.95,11.832,80.436,33.317C425.553,175.179,425.553,247.346,381.201,291.697z" fill="url(#SVGID_1_)"/>
12
+ <path d="M258.117,115.27l3.604,9.328c2.592-1.001,5.267-1.887,7.949-2.632l-2.676-9.636 C263.998,113.162,261.012,114.151,258.117,115.27z" fill="#3bf488ff"/>
13
+ <path d="M206.264,162.886l8.985,4.389c8.299-16.992,22.191-30.997,39.118-39.433l-4.46-8.95 C231.022,128.304,215.523,143.928,206.264,162.886z" fill="#1e15a3ff"/>
14
+ </g>
15
+ </svg>
@@ -3,6 +3,8 @@
3
3
  Empty title
4
4
  [](./1.md)
5
5
 
6
+ ### Uploading Attributes via Import File {#create-attribute-with-template}
7
+
6
8
  Empty subtitle
7
9
  [](./1.md#subtitle)
8
10
 
@@ -18,6 +20,17 @@ Empty local title
18
20
  Special local title
19
21
  [{#T}](#header)
20
22
 
23
+ Reference link
24
+ [{#T}][link]
25
+
26
+ Reference link with hash
27
+ [{#T}][link-with-hash]
28
+
29
+ [link]: ./mermaid.md
30
+ [link-with-hash]: ./1.md#subtitle
31
+
21
32
  ## Header {#header}
22
33
 
23
34
  Content
35
+
36
+ #### Step 1. Follow the steps described in the [{#T}](#create-attribute-with-template) section
@@ -1,5 +1,96 @@
1
- # Images
1
+ # Images ![svg image 1](_assets/1.svg)
2
2
 
3
3
  ![simple image](_assets/1.png)
4
4
 
5
+ <!-- ![comm svg image 1](_assets/1.svg) -->
6
+ 1. `![code svg image 1](_assets/1.svg)`
7
+ ![svg image 11](_assets/1.svg)
5
8
 
9
+ <!-- ![comm svg image 2](_assets/1.svg "Mountain" =100x200) -->
10
+ 2. `![code svg image 2](_assets/1.svg "Mountain" =100x200)`
11
+ ![svg image 2](_assets/1.svg "Mountain" =100x200)
12
+
13
+ <!-- ![comm reference image 3][image1] -->
14
+ 3. `![code reference image 3][image1]`
15
+ ![reference image 3][image1]
16
+
17
+ 4. `![code image1][]`
18
+ ![image1][]
19
+
20
+ [image1]: _assets/1.svg "Svg"
21
+
22
+ <!-- [![comm svg image 4](_assets/1.svg)](https://yandex.com/images/search?text=mountain) -->
23
+ 5. `[![code svg image 4](_assets/1.svg)](https://yandex.com/images/search?text=mountain)`
24
+ [![svg image 4](_assets/1.svg)](https://yandex.com/images/search?text=mountain)
25
+
26
+ <!-- [![comm svg image 5](_assets/1.svg "Title"){width=100 height=200}](https://yandex.com/images/search?text=mountain) -->
27
+ 6. `[![code svg image 5](_assets/1.svg "Title"){width=100 height=200}](https://yandex.com/images/search?text=mountain)`
28
+ [![svg image 5](_assets/1.svg "Title"){width=100 height=200}](https://yandex.com/images/search?text=mountain)
29
+
30
+
31
+ 7. `![title][code]{width=100 height=200}`
32
+ ![title][code]{width=100 height=200}
33
+
34
+ 8. `![code][]{width=100}`
35
+ ![code][]{width=100}
36
+
37
+ [code]: _assets/1.svg
38
+
39
+ 9. `[![code Source Code][badge-source]][source]`
40
+ [![Source Code][badge-source]][source]
41
+
42
+ 10. `![no inline for reference][png]`
43
+ ![no inline for reference][png]
44
+
45
+ [badge-source]: _assets/1.svg
46
+ [png]: _assets/1.png
47
+ [source]: https://github.com/ramsey/uuid/tree/3.x
48
+
49
+ 11. Definition list
50
+ Term
51
+ : Definition with
52
+
53
+ ![img](_assets/1.svg)
54
+ and more text
55
+
56
+ 20. Сodeblocks - no inline svg
57
+ ```
58
+ Codeblock fence
59
+ ![code svg image 10.1](_assets/1.svg)
60
+ ```
61
+
62
+ ````
63
+ Codeblock in codeblock
64
+ ```
65
+ ![code svg image 10.2](_assets/1.svg)
66
+ ```
67
+ ![code svg image 10.2](_assets/1.svg)
68
+ ````
69
+
70
+ ~~~
71
+ Codeblock tilda
72
+ ![code svg image 10.3](_assets/1.svg)
73
+ ~~~
74
+
75
+ ```````md translate=no
76
+ Codeblock 10 fence
77
+ ![code svg image 10.4](_assets/1.svg)
78
+ ```````
79
+
80
+ Codeblock 4 spaces
81
+ ![code svg image 10.5](_assets/1.svg)
82
+ row 3
83
+
84
+ 1. Codeblock 4 spaces in list
85
+
86
+ ![code svg image 10.6](_assets/1.svg)
87
+ 1. Codeblock fence in list with bad gap
88
+ ```
89
+ ![code svg image 10.7](_assets/1.svg)
90
+ ```
91
+
92
+ ```md
93
+ Codeblock with inline code
94
+ `![code svg image 22](_assets/1.svg)`
95
+ 1. ![code svg image 23](_assets/1.svg)
96
+ ```
@@ -5,15 +5,15 @@ items:
5
5
  href: index.yaml
6
6
  - include: {mode: merge, path: folder1/toc-i.yaml}
7
7
  - name: Yandex Flavored Markdown
8
- href: index-yfm.md
8
+ href:
9
9
  items:
10
10
  - name: Синтаксис
11
11
  items:
12
12
  - name: Обзор
13
13
  href: syntax/index.md
14
- when: test == "nested"
15
14
  - name: Базовая разметка
16
15
  href: syntax/base.md
17
16
  - name: Списки
18
17
  href: syntax/lists.md
19
- - name: Таблицы
18
+ - name: Was filtered above
19
+ href: use_filtered_above.md
@@ -0,0 +1,4 @@
1
+ ### Theese links were filtered
2
+
3
+ [test2](./syntax/base.md)
4
+ [test3](./syntax/lists.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diplodoc/cli-tests",
3
- "version": "0.0.0-rc-resolve-codeblock-202509151421",
3
+ "version": "0.0.0-rc-disable-resolve-codeblock-17941220955",
4
4
  "bin": {
5
5
  "diplodoc-cli-test": "bin.mjs"
6
6
  },