@diplodoc/cli-tests 5.13.3 → 5.14.1

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 (34) hide show
  1. package/e2e/__snapshots__/includes.test.ts.snap +477 -0
  2. package/e2e/__snapshots__/metadata.spec.ts.snap +19 -6
  3. package/e2e/__snapshots__/pdf-page.spec.ts.snap +2 -2
  4. package/e2e/__snapshots__/regression.test.ts.snap +64 -38
  5. package/e2e/__snapshots__/translation.spec.ts.snap +154 -0
  6. package/e2e/includes.test.ts +38 -0
  7. package/e2e/translation.spec.ts +24 -0
  8. package/fixtures/utils/file.ts +21 -0
  9. package/mocks/includes/input/.yfm +1 -0
  10. package/mocks/includes/input/_assets/4.png +0 -0
  11. package/mocks/includes/input/includes/commented-include.md +5 -0
  12. package/mocks/includes/input/includes/deep-include.md +13 -0
  13. package/mocks/includes/input/includes/fragments.md +23 -0
  14. package/mocks/includes/input/includes/nested-include.md +5 -0
  15. package/mocks/includes/input/includes/no-title-include.md +19 -0
  16. package/mocks/includes/input/includes/root-include.md +11 -0
  17. package/mocks/includes/input/includes/user.md +5 -0
  18. package/mocks/includes/input/index.md +62 -0
  19. package/mocks/includes/input/level1/includes/level1-include.md +11 -0
  20. package/mocks/includes/input/level1/level2/includes/level2-include.md +11 -0
  21. package/mocks/includes/input/level1/level2/page2.md +29 -0
  22. package/mocks/includes/input/level1/page1.md +29 -0
  23. package/mocks/includes/input/presets.yaml +3 -0
  24. package/mocks/includes/input/toc-include.md +13 -0
  25. package/mocks/includes/input/toc.yaml +13 -0
  26. package/mocks/includes-missing/input/index.md +7 -0
  27. package/mocks/includes-missing/input/toc.yaml +3 -0
  28. package/mocks/metadata/md2html-with-metadata/input/.yfm +1 -0
  29. package/mocks/metadata/md2html-with-metadata/input/page.md +3 -1
  30. package/mocks/regression/input/includes/fragments.md +17 -0
  31. package/mocks/regression/input/includes.md +4 -0
  32. package/mocks/translation/conditions/input/index.md +11 -0
  33. package/mocks/translation/conditions/input/toc.yaml +5 -0
  34. package/package.json +1 -1
@@ -665,6 +665,77 @@ exports[`Translate command > do not filter files on extract > filelist 1`] = `
665
665
  ]"
666
666
  `;
667
667
 
668
+ exports[`Translate command > do not resolve liquid conditions if vars not specified and send content as is for extract > filelist 1`] = `
669
+ "[
670
+ "index.md.skl",
671
+ "index.md.xliff",
672
+ "toc.yaml.skl",
673
+ "toc.yaml.xliff"
674
+ ]"
675
+ `;
676
+
677
+ exports[`Translate command > do not resolve liquid conditions if vars not specified and send content as is for extract 1`] = `
678
+ "#|
679
+ ||
680
+ %%%0%%%
681
+ ||
682
+ ||
683
+ %%%1%%%{% endif %}
684
+ ||
685
+ |#"
686
+ `;
687
+
688
+ exports[`Translate command > do not resolve liquid conditions if vars not specified and send content as is for extract 2`] = `
689
+ "<?xml version="1.0" encoding="UTF-8"?>
690
+ <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
691
+ <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
692
+ <header>
693
+ <skeleton>
694
+ <external-file href="file.skl"></external-file>
695
+ </skeleton>
696
+ </header>
697
+ <body>
698
+ <trans-unit id="0">
699
+ <source xml:space="preserve"><g ctype="bold" equiv-text="**{{text}}**" id="g-1" x-begin="**" x-end="**">Заголовок</g></source>
700
+ </trans-unit>
701
+ <trans-unit id="1">
702
+ <source xml:space="preserve">Доступны в любом отчете в виде <g ctype="link" equiv-text="[{{text}}](../general/goals.md)" id="g-2" x-begin="[" x-end="](../general/goals.md)">целей</g>, а также в отчетах:<x ctype="lb" equiv-text="&amp;#10;" id="x-1"/><x ctype="liquid_Literal" equiv-text="{% if tld == &quot;ru&quot; or tld == &quot;es&quot; or tld == &quot;pt&quot; or tld == &quot;com&quot; or tld == &quot;tr&quot; %}" id="x-2"/>- <g ctype="link" equiv-text="[{{text}}](../reports/ecommerce.md)" id="g-3" x-begin="[" x-end="](../reports/ecommerce.md)">электронной коммерции</g><x ctype="liquid_Literal" equiv-text="{% endif %}" id="x-3"/><x ctype="liquid_Literal" equiv-text="{% if tld == &quot;zh&quot; %}" id="x-4"/>- электронной коммерции<x ctype="liquid_Literal" equiv-text="{% endif %}" id="x-5"/>;<x ctype="lb" equiv-text="&amp;#10;" id="x-6"/><x ctype="liquid_Literal" equiv-text="{% if tld == &quot;ru&quot;%}" id="x-7"/>- <g ctype="link" equiv-text="[{{text}}](../data/user-params-data.md)" id="g-4" x-begin="[" x-end="](../data/user-params-data.md)">по параметрам посетителей</g><x ctype="liquid_Literal" equiv-text="{% endif %}" id="x-8"/><x ctype="liquid_Literal" equiv-text="{% if tld == &quot;es&quot; or tld == &quot;pt&quot; or tld == &quot;com&quot; or tld == &quot;zh&quot; or tld == &quot;tr&quot; %}" id="x-9"/>- по параметрам посетителей<x ctype="liquid_Literal" equiv-text="{% endif %}" id="x-10"/>;<x ctype="lb" equiv-text="&amp;#10;" id="x-11"/><x ctype="liquid_Literal" equiv-text="{% if tld == &quot;ru&quot; or tld == &quot;es&quot; or tld == &quot;pt&quot; or tld == &quot;com&quot; or tld == &quot;tr&quot; %}" id="x-12"/>- <g ctype="link" equiv-text="[{{text}}](../data/visit-params-data.md)" id="g-5" x-begin="[" x-end="](../data/visit-params-data.md)">по параметрам визитов</g><x ctype="liquid_Literal" equiv-text="{% endif %}" id="x-13"/><x ctype="liquid_Literal" equiv-text="{% if tld == &quot;zh&quot; %}" id="x-14"/>- по параметрам визитов</source>
703
+ </trans-unit>
704
+ </body>
705
+ </file>
706
+ </xliff>"
707
+ `;
708
+
709
+ exports[`Translate command > do not resolve liquid conditions if vars not specified and send content as is for extract 3`] = `
710
+ "title: '%%%0%%%'
711
+ href: index.md
712
+ items:
713
+ - name: '%%%1%%%'
714
+ href: index.md
715
+ "
716
+ `;
717
+
718
+ exports[`Translate command > do not resolve liquid conditions if vars not specified and send content as is for extract 4`] = `
719
+ "<?xml version="1.0" encoding="UTF-8"?>
720
+ <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
721
+ <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
722
+ <header>
723
+ <skeleton>
724
+ <external-file href="file.skl"></external-file>
725
+ </skeleton>
726
+ </header>
727
+ <body>
728
+ <trans-unit id="0">
729
+ <source xml:space="preserve">Conditions</source>
730
+ </trans-unit>
731
+ <trans-unit id="1">
732
+ <source xml:space="preserve">Example</source>
733
+ </trans-unit>
734
+ </body>
735
+ </file>
736
+ </xliff>"
737
+ `;
738
+
668
739
  exports[`Translate command > extract openapi spec files > filelist 1`] = `
669
740
  "[
670
741
  "openapi-spec.yaml.skl",
@@ -1261,6 +1332,89 @@ exports[`Translate command > filter files on extract with extra vars option > fi
1261
1332
  ]"
1262
1333
  `;
1263
1334
 
1335
+ exports[`Translate command > resolve liquid conditions if vars specified, liquid syntax will be deleted > filelist 1`] = `
1336
+ "[
1337
+ "index.md.skl",
1338
+ "index.md.xliff",
1339
+ "toc.yaml.skl",
1340
+ "toc.yaml.xliff"
1341
+ ]"
1342
+ `;
1343
+
1344
+ exports[`Translate command > resolve liquid conditions if vars specified, liquid syntax will be deleted 1`] = `
1345
+ "#|
1346
+ ||
1347
+ %%%0%%%
1348
+ ||
1349
+ ||
1350
+ %%%1%%%
1351
+ - %%%2%%%
1352
+ - %%%3%%%
1353
+ - %%%4%%%
1354
+ ||
1355
+ |#"
1356
+ `;
1357
+
1358
+ exports[`Translate command > resolve liquid conditions if vars specified, liquid syntax will be deleted 2`] = `
1359
+ "<?xml version="1.0" encoding="UTF-8"?>
1360
+ <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1361
+ <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1362
+ <header>
1363
+ <skeleton>
1364
+ <external-file href="file.skl"></external-file>
1365
+ </skeleton>
1366
+ </header>
1367
+ <body>
1368
+ <trans-unit id="0">
1369
+ <source xml:space="preserve"><g ctype="bold" equiv-text="**{{text}}**" id="g-1" x-begin="**" x-end="**">Заголовок</g></source>
1370
+ </trans-unit>
1371
+ <trans-unit id="1">
1372
+ <source xml:space="preserve">Доступны в любом отчете в виде <g ctype="link" equiv-text="[{{text}}](../general/goals.md)" id="g-2" x-begin="[" x-end="](../general/goals.md)">целей</g>, а также в отчетах:</source>
1373
+ </trans-unit>
1374
+ <trans-unit id="2">
1375
+ <source xml:space="preserve"><g ctype="link" equiv-text="[{{text}}](../reports/ecommerce.md)" id="g-3" x-begin="[" x-end="](../reports/ecommerce.md)">электронной коммерции</g>;</source>
1376
+ </trans-unit>
1377
+ <trans-unit id="3">
1378
+ <source xml:space="preserve"><g ctype="link" equiv-text="[{{text}}](../data/user-params-data.md)" id="g-4" x-begin="[" x-end="](../data/user-params-data.md)">по параметрам посетителей</g>;</source>
1379
+ </trans-unit>
1380
+ <trans-unit id="4">
1381
+ <source xml:space="preserve"><g ctype="link" equiv-text="[{{text}}](../data/visit-params-data.md)" id="g-5" x-begin="[" x-end="](../data/visit-params-data.md)">по параметрам визитов</g></source>
1382
+ </trans-unit>
1383
+ </body>
1384
+ </file>
1385
+ </xliff>"
1386
+ `;
1387
+
1388
+ exports[`Translate command > resolve liquid conditions if vars specified, liquid syntax will be deleted 3`] = `
1389
+ "title: '%%%0%%%'
1390
+ href: index.md
1391
+ items:
1392
+ - name: '%%%1%%%'
1393
+ href: index.md
1394
+ "
1395
+ `;
1396
+
1397
+ exports[`Translate command > resolve liquid conditions if vars specified, liquid syntax will be deleted 4`] = `
1398
+ "<?xml version="1.0" encoding="UTF-8"?>
1399
+ <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1400
+ <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1401
+ <header>
1402
+ <skeleton>
1403
+ <external-file href="file.skl"></external-file>
1404
+ </skeleton>
1405
+ </header>
1406
+ <body>
1407
+ <trans-unit id="0">
1408
+ <source xml:space="preserve">Conditions</source>
1409
+ </trans-unit>
1410
+ <trans-unit id="1">
1411
+ <source xml:space="preserve">Example</source>
1412
+ </trans-unit>
1413
+ </body>
1414
+ </file>
1415
+ </xliff>"
1416
+ `;
1417
+
1264
1418
  exports[`Translate command > test no-translate directive > filelist 1`] = `
1265
1419
  "[
1266
1420
  "index.md.skl",
@@ -0,0 +1,38 @@
1
+ import {describe, expect, test} from 'vitest';
2
+
3
+ import {TestAdapter, compareDirectories, getTestPaths} from '../fixtures';
4
+
5
+ describe('Includes', () => {
6
+ test('Various include scenarios', async () => {
7
+ const {inputPath, outputPath} = getTestPaths('mocks/includes');
8
+
9
+ // Test md2md transformation
10
+ await TestAdapter.testBuildPass(inputPath, outputPath, {
11
+ md2md: true,
12
+ md2html: false,
13
+ });
14
+ await compareDirectories(outputPath);
15
+
16
+ // Test md2html transformation
17
+ await TestAdapter.testBuildPass(outputPath, outputPath + '-html', {
18
+ md2md: false,
19
+ md2html: true,
20
+ });
21
+ await compareDirectories(outputPath + '-html');
22
+ });
23
+
24
+ test('Include with missing file should fail', async () => {
25
+ const {inputPath, outputPath} = getTestPaths('mocks/includes-missing');
26
+
27
+ // Test md2md transformation should fail
28
+ const mdReport = await TestAdapter.build.run(inputPath, outputPath, ['-f', 'md']);
29
+ expect(mdReport.code).toBeGreaterThan(0);
30
+
31
+ // Test md2html transformation should fail
32
+ const htmlReport = await TestAdapter.build.run(inputPath, outputPath + '-html', [
33
+ '-f',
34
+ 'html',
35
+ ]);
36
+ expect(htmlReport.code).toBeGreaterThan(0);
37
+ });
38
+ });
@@ -103,6 +103,30 @@ describe('Translate command', () => {
103
103
  },
104
104
  );
105
105
 
106
+ const conditions = {tld: 'ru'};
107
+ generateMapTestTemplate(
108
+ 'resolve liquid conditions if vars specified, liquid syntax will be deleted',
109
+ 'mocks/translation/conditions',
110
+ {
111
+ subcommand: 'extract',
112
+ source: 'ru-RU',
113
+ target: 'es-ES',
114
+ additionalArgs: `--vars ${JSON.stringify(conditions)}`,
115
+ },
116
+ false,
117
+ );
118
+
119
+ generateMapTestTemplate(
120
+ 'do not resolve liquid conditions if vars not specified and send content as is for extract',
121
+ 'mocks/translation/conditions',
122
+ {
123
+ subcommand: 'extract',
124
+ source: 'ru-RU',
125
+ target: 'es-ES',
126
+ },
127
+ false,
128
+ );
129
+
106
130
  generateMapTestTemplate(
107
131
  'test no-translate directive',
108
132
  'mocks/translation/no-translate',
@@ -27,6 +27,27 @@ export function stripSystemLinks(content: string) {
27
27
  '',
28
28
  );
29
29
 
30
+ content = content.replace(
31
+ new RegExp(
32
+ `<meta http-equiv="last-modified" content="\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z">`,
33
+ 'g',
34
+ ),
35
+ '<meta http-equiv="last-modified" content="2025-10-15T00:00:00.000Z">',
36
+ );
37
+
38
+ content = content.replace(
39
+ new RegExp(
40
+ `<meta property="article:modified_time" content="\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z">`,
41
+ 'g',
42
+ ),
43
+ '<meta property="article:modified_time" content="2025-10-15T00:00:00.000Z">',
44
+ );
45
+
46
+ content = content.replace(
47
+ new RegExp(`"updatedAt":"\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z"`, 'g'),
48
+ '"updatedAt":"2025-10-15T00:00:00.000Z"',
49
+ );
50
+
30
51
  content = content.replace(/^[ \t]*\r?\n/gm, '');
31
52
 
32
53
  return content;
@@ -0,0 +1 @@
1
+ projectTitle: Test Includes
File without changes
@@ -0,0 +1,5 @@
1
+ This is a commented include.
2
+
3
+ <!-- {% include [test](test.md) %} -->
4
+
5
+ [Link to index](../index.md)
@@ -0,0 +1,13 @@
1
+ # Deep nested include [→ index](../index.md) {#deep-nested-include}
2
+
3
+ [Link to index](../index.md)
4
+
5
+ [Link to level1 page1](../level1/page1.md)
6
+
7
+ [Link to level2 page2](../level1/level2/page2.md)
8
+
9
+ This is a deep nested include.
10
+
11
+ {% include [user](user.md) %}
12
+
13
+ ![img 3](../_assets/{{img_3}})
@@ -0,0 +1,23 @@
1
+ # Fragments for include
2
+
3
+ ## Section 1 {#section1}
4
+
5
+ This is content of section 1.
6
+
7
+ ## Section 2 {#section2}
8
+
9
+ This is content of section 2.
10
+
11
+ ### Subsection 2.1 {#subsection21}
12
+
13
+ This is content of subsection 2.1.
14
+
15
+ ## Section 3 {#section3}
16
+
17
+ This is content of section 3.
18
+
19
+ Some paragraph with anchor {#p1}
20
+
21
+ Some paragraph without anchor
22
+
23
+ Some paragraph with anchor {#p2}
@@ -0,0 +1,5 @@
1
+ # Nested include [→ index](../index.md) {#nested-include}
2
+
3
+ This is a nested include.
4
+
5
+ {% include [level1-include](../level1/includes/level1-include.md) %}
@@ -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,5 @@
1
+ # User include [→ index](../index.md) {#user-include}
2
+
3
+ [Link to index](../index.md)
4
+
5
+ This is a user include with variable substitution: {{user}}
@@ -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,3 @@
1
+ default:
2
+ user: Alice
3
+ img_3: 4.png
@@ -0,0 +1,13 @@
1
+ # Toc Include
2
+
3
+ This file is included in the toc.
4
+
5
+ [Link to index](index.md)
6
+
7
+ [Link to page1](level1/page1.md)
8
+
9
+ [Link to page2](level1/level2/page2.md)
10
+
11
+ ## Include with anchor
12
+
13
+ {% include [fragment](includes/fragments.md#section1) %}
@@ -0,0 +1,13 @@
1
+ items:
2
+ - name: Test Includes
3
+ href: index.md
4
+ - name: Toc Include
5
+ href: toc-include.md
6
+ - name: Level 1
7
+ items:
8
+ - name: Page 1
9
+ href: level1/page1.md
10
+ - name: Level 2
11
+ items:
12
+ - name: Page 2
13
+ href: level1/level2/page2.md
@@ -0,0 +1,7 @@
1
+ # Test Includes with Missing File
2
+
3
+ This is a test page for include with missing file scenario.
4
+
5
+ ## Include with missing file
6
+
7
+ {% include [missing](includes/missing.md) %}
@@ -0,0 +1,3 @@
1
+ items:
2
+ - name: Test Includes with Missing File
3
+ href: index.md
@@ -0,0 +1 @@
1
+ mtimes: true
@@ -9,6 +9,8 @@ interface:
9
9
  metadata:
10
10
  - name: yfm
11
11
  content: builder in page
12
+ - property: og:title
13
+ content: Some kind of headline
12
14
  ---
13
15
 
14
- Lorem
16
+ Lorem
@@ -0,0 +1,17 @@
1
+ ### F1 {#f1}
2
+ Content F1
3
+
4
+ ## F2 {#f2}
5
+ Content F2
6
+
7
+ ### F2.1 {#f2.1}
8
+ Content F2.1
9
+
10
+ ## F3 {#f3}
11
+ Content F3
12
+
13
+ Some paragraph with anchor {#p1}
14
+
15
+ Some paragraph without anchor
16
+
17
+ Some paragraph with anchor {#p2}
@@ -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
 
@@ -0,0 +1,11 @@
1
+ #|
2
+ ||
3
+ **Заголовок**
4
+ ||
5
+ ||
6
+ Доступны в любом отчете в виде [целей](../general/goals.md), а также в отчетах:
7
+ {% if tld == "ru" or tld == "es" or tld == "pt" or tld == "com" or tld == "tr" %}- [электронной коммерции](../reports/ecommerce.md){% endif %}{% if tld == "zh" %}- электронной коммерции{% endif %};
8
+ {% if tld == "ru"%}- [по параметрам посетителей](../data/user-params-data.md){% endif %}{% if tld == "es" or tld == "pt" or tld == "com" or tld == "zh" or tld == "tr" %}- по параметрам посетителей{% endif %};
9
+ {% if tld == "ru" or tld == "es" or tld == "pt" or tld == "com" or tld == "tr" %}- [по параметрам визитов](../data/visit-params-data.md){% endif %}{% if tld == "zh" %}- по параметрам визитов{% endif %}
10
+ ||
11
+ |#
@@ -0,0 +1,5 @@
1
+ title: Conditions
2
+ href: index.md
3
+ items:
4
+ - name: Example
5
+ href: index.md
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diplodoc/cli-tests",
3
- "version": "5.13.3",
3
+ "version": "5.14.1",
4
4
  "bin": {
5
5
  "diplodoc-cli-test": "bin.mjs"
6
6
  },