@diplodoc/cli-tests 0.0.0-rc-resolve-codeblock-202509151421 → 0.0.0-rc-rebase-links-in-autotitles-17972680369

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 (65) hide show
  1. package/e2e/__snapshots__/alternates.test.ts.snap +896 -0
  2. package/e2e/__snapshots__/bundles.spec.ts.snap +9 -3
  3. package/e2e/__snapshots__/include-toc.test.ts.snap +3 -13
  4. package/e2e/__snapshots__/load-custom-resources.spec.ts.snap +6 -9
  5. package/e2e/__snapshots__/metadata.spec.ts.snap +3 -6
  6. package/e2e/__snapshots__/plugin-corner-cases.spec.ts.snap +0 -0
  7. package/e2e/__snapshots__/preprocess.test.ts.snap +870 -34
  8. package/e2e/__snapshots__/regression.test.ts.snap +20 -36
  9. package/e2e/__snapshots__/restricted-access.test.ts.snap +0 -10
  10. package/e2e/__snapshots__/rtl.spec.ts.snap +18 -6
  11. package/e2e/__snapshots__/search.test.ts.snap +1 -1
  12. package/e2e/__snapshots__/single-page.spec.ts.snap +9 -3
  13. package/e2e/__snapshots__/skip-html-extension.spec.ts.snap +4 -4
  14. package/e2e/__snapshots__/translation.spec.ts.snap +14 -16
  15. package/e2e/alternates.test.ts +35 -0
  16. package/e2e/bundles.spec.ts +1 -0
  17. package/e2e/errors.spec.ts +18 -8
  18. package/e2e/generate-map.spec.ts +6 -2
  19. package/e2e/include-toc.test.ts +1 -0
  20. package/e2e/load-custom-resources.spec.ts +1 -0
  21. package/e2e/metadata.spec.ts +1 -0
  22. package/e2e/plugin-corner-cases.spec.ts +1 -0
  23. package/e2e/preprocess.test.ts +9 -2
  24. package/e2e/redirects-validation.spec.ts +5 -4
  25. package/e2e/regression.test.ts +1 -0
  26. package/e2e/restricted-access.test.ts +3 -5
  27. package/e2e/rtl.spec.ts +1 -0
  28. package/e2e/search.test.ts +1 -0
  29. package/e2e/single-page.spec.ts +1 -0
  30. package/e2e/skip-html-extension.spec.ts +1 -0
  31. package/e2e/translation.spec.ts +18 -7
  32. package/fixtures/cliAdapter.ts +7 -3
  33. package/fixtures/globals.d.ts +1 -1
  34. package/fixtures/runners/binary.ts +5 -2
  35. package/fixtures/runners/index.ts +2 -1
  36. package/fixtures/runners/source.ts +1 -1
  37. package/fixtures/utils/file.ts +20 -16
  38. package/fixtures/utils/test.ts +20 -18
  39. package/mocks/alternates/input/.yfm +1 -0
  40. package/mocks/alternates/input/az/about.md +3 -0
  41. package/mocks/alternates/input/az/deep/test.md +3 -0
  42. package/mocks/alternates/input/az/index.yaml +3 -0
  43. package/mocks/alternates/input/az/toc.yaml +6 -0
  44. package/mocks/alternates/input/en/about.md +3 -0
  45. package/mocks/alternates/input/en/deep/test.md +3 -0
  46. package/mocks/alternates/input/en/index.yaml +3 -0
  47. package/mocks/alternates/input/en/toc.yaml +6 -0
  48. package/mocks/alternates/input/ru/about.md +8 -0
  49. package/mocks/alternates/input/ru/deep/test.md +3 -0
  50. package/mocks/alternates/input/ru/index.yaml +3 -0
  51. package/mocks/alternates/input/ru/toc.yaml +6 -0
  52. package/mocks/preprocess/input/_assets/1.svg +15 -0
  53. package/mocks/preprocess/input/autotitle.md +16 -0
  54. package/mocks/preprocess/input/images.md +92 -1
  55. package/mocks/preprocess/input/includes/level1.md +9 -0
  56. package/mocks/preprocess/input/includes/level11.md +1 -0
  57. package/mocks/preprocess/input/includes/sub/level2.md +7 -0
  58. package/mocks/preprocess/input/level0.md +7 -0
  59. package/mocks/preprocess/input/level1/level1.md +7 -0
  60. package/mocks/preprocess/input/level1/level2/level2.md +6 -0
  61. package/mocks/preprocess/input/level1/toc.yaml +5 -0
  62. package/mocks/preprocess/input/toc.yaml +8 -0
  63. package/mocks/translation/dir-files/input/ru/nested/toc.yaml +3 -3
  64. package/mocks/translation/dir-files/input/ru/nested/use_filtered_above.md +4 -0
  65. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
1
  import {describe, it} from 'vitest';
2
+
2
3
  import {TestAdapter, compareDirectories, getTestPaths} from '../fixtures';
3
4
 
4
5
  describe('Local search', () => {
@@ -1,4 +1,5 @@
1
1
  import {describe, test} from 'vitest';
2
+
2
3
  import {TestAdapter, compareDirectories, getTestPaths} from '../fixtures';
3
4
 
4
5
  const generateMapTestSinglePageTemplate = (
@@ -1,4 +1,5 @@
1
1
  import {describe, it} from 'vitest';
2
+
2
3
  import {TestAdapter, compareDirectories, getTestPaths} from '../fixtures';
3
4
 
4
5
  describe('Skip html extension', () => {
@@ -1,5 +1,8 @@
1
+ import type {TranslateRunArgs} from '../fixtures';
2
+
1
3
  import {describe, test} from 'vitest';
2
- import {TestAdapter, TranslateRunArgs, compareDirectories, getTestPaths} from '../fixtures';
4
+
5
+ import {TestAdapter, compareDirectories, getTestPaths} from '../fixtures';
3
6
 
4
7
  const generateMapTestTemplate = (
5
8
  testTitle: string,
@@ -37,7 +40,7 @@ const buildFilesYamlTestTemplate = (
37
40
  ) => {
38
41
  test(testTitle, async () => {
39
42
  const {inputPath, outputPath} = getTestPaths(testRootPath);
40
- const {md2md, md2html} =buildProps;
43
+ const {md2md, md2html} = buildProps;
41
44
 
42
45
  await TestAdapter.testBuildPass(inputPath, outputPath, {md2html, md2md});
43
46
 
@@ -46,9 +49,17 @@ const buildFilesYamlTestTemplate = (
46
49
  };
47
50
 
48
51
  describe('Translate command', () => {
49
- buildFilesYamlTestTemplate('build translated md files and remove no-translate directives', 'mocks/translation/no-translate', {md2md: true});
52
+ buildFilesYamlTestTemplate(
53
+ 'build translated md files and remove no-translate directives',
54
+ 'mocks/translation/no-translate',
55
+ {md2md: true},
56
+ );
50
57
 
51
- buildFilesYamlTestTemplate('build translated static files and remove no-translate directives', 'mocks/translation/no-translate', {md2html: true});
58
+ buildFilesYamlTestTemplate(
59
+ 'build translated static files and remove no-translate directives',
60
+ 'mocks/translation/no-translate',
61
+ {md2html: true},
62
+ );
52
63
 
53
64
  generateFilesYamlTestTemplate('extract openapi spec files', 'mocks/translation/openapi', {
54
65
  subcommand: 'extract',
@@ -66,7 +77,7 @@ describe('Translate command', () => {
66
77
  subcommand: 'extract',
67
78
  source: 'ru-RU',
68
79
  target: 'es-ES',
69
- additionalArgs: '--filter'
80
+ additionalArgs: '--filter',
70
81
  });
71
82
 
72
83
  generateMapTestTemplate(
@@ -80,7 +91,7 @@ describe('Translate command', () => {
80
91
  },
81
92
  );
82
93
 
83
- const vars = {skip: 'prod'}
94
+ const vars = {skip: 'prod'};
84
95
  generateMapTestTemplate(
85
96
  'filter files on extract with extra vars option',
86
97
  'mocks/translation/dir-files',
@@ -98,7 +109,7 @@ describe('Translate command', () => {
98
109
  {
99
110
  subcommand: 'extract',
100
111
  source: 'ru-RU',
101
- target: 'es-ES',
112
+ target: 'es-ES',
102
113
  },
103
114
  false,
104
115
  );
@@ -1,4 +1,6 @@
1
- import {Runner, createRunner} from './runners';
1
+ import type {Runner} from './runners';
2
+
3
+ import {createRunner} from './runners';
2
4
  import {cleanupDirectory} from './utils/file';
3
5
 
4
6
  export interface BuildRunArgs {
@@ -76,8 +78,10 @@ export class CliTestAdapter {
76
78
  const tasks = [];
77
79
 
78
80
  if (md2md && md2html) {
79
- tasks.push(() => this.build.run(inputPath, outputPath,[...baseArgs, '-f', 'md']));
80
- tasks.push(() => this.build.run(inputPath, `${outputPath}-html`, [...baseArgs, '-f', 'html']));
81
+ tasks.push(() => this.build.run(inputPath, outputPath, [...baseArgs, '-f', 'md']));
82
+ tasks.push(() =>
83
+ this.build.run(inputPath, `${outputPath}-html`, [...baseArgs, '-f', 'html']),
84
+ );
81
85
  } else if (md2md) {
82
86
  tasks.push(() => this.build.run(inputPath, outputPath, [...baseArgs, '-f', 'md']));
83
87
  } else {
@@ -1,4 +1,4 @@
1
- declare module "@diplodoc/cli/manifest" {
1
+ declare module '@diplodoc/cli/manifest' {
2
2
  const manifest: Record<string, Record<string, string[]>>;
3
3
  export = manifest;
4
4
  }
@@ -1,4 +1,5 @@
1
- import {Runner} from './types';
1
+ import type {Runner} from './types';
2
+
2
3
  import {execa} from 'execa';
3
4
  import strip from 'strip-ansi';
4
5
 
@@ -20,6 +21,7 @@ export class BinaryRunner implements Runner {
20
21
  const restLog = fillLog(/^(?!INFO|WARN|ERR)/, stderr);
21
22
  if (restLog.length) {
22
23
  for (const line of restLog) {
24
+ // eslint-disable-next-line no-console
23
25
  console.log(line);
24
26
  }
25
27
  }
@@ -29,7 +31,8 @@ export class BinaryRunner implements Runner {
29
31
  }
30
32
 
31
33
  function fillLog(filter: RegExp, source: string) {
32
- return source.split('\n')
34
+ return source
35
+ .split('\n')
33
36
  .map((line) => strip(line).trim())
34
37
  .filter(Boolean)
35
38
  .filter((line) => line.match(filter));
@@ -7,7 +7,8 @@ import {Runner} from './types';
7
7
  export {Runner};
8
8
 
9
9
  export function createRunner(): Runner {
10
- const binaryPath = process.env.DIPLODOC_BINARY_PATH || resolve(__dirname, '../../../build/index.js');
10
+ const binaryPath =
11
+ process.env.DIPLODOC_BINARY_PATH || resolve(__dirname, '../../../build/index.js');
11
12
 
12
13
  if (binaryPath) {
13
14
  return new BinaryRunner(binaryPath);
@@ -8,7 +8,7 @@ export class SourceRunner {
8
8
 
9
9
  const baseArgs = ['node', this.MODULE_PATH, ...argv];
10
10
 
11
- const report = await run(baseArgs) as Report;
11
+ const report = (await run(baseArgs)) as Report;
12
12
 
13
13
  return report;
14
14
  }
@@ -2,29 +2,29 @@ import {readFileSync} from 'node:fs';
2
2
  import {rm} from 'node:fs/promises';
3
3
  import {join, resolve} from 'node:path';
4
4
  import {glob} from 'glob';
5
- import {bundleless, hashless, platformless} from './test';
6
5
  import {expect} from 'vitest';
7
6
 
7
+ import {bundleless, hashless, platformless} from './test';
8
+
8
9
  const SYSTEM_DIRS = ['_bundle/', '_search/'];
9
10
 
10
11
  export function getFileContent(filePath: string) {
11
12
  return platformless(bundleless(readFileSync(filePath, 'utf8')));
12
13
  }
13
14
 
14
- const uselessFile = (file: string, dirs: string[]) =>
15
- !dirs.some((part) => file.includes(part));
15
+ const uselessFile = (file: string, dirs: string[]) => !dirs.some((part) => file.includes(part));
16
16
 
17
17
  export function stripSystemLinks(content: string) {
18
- const dirPattern = SYSTEM_DIRS.map(d => d.replace('/', '\\/')).join('|');
18
+ const dirPattern = SYSTEM_DIRS.map((d) => d.replace('/', '\\/')).join('|');
19
19
 
20
20
  content = content.replace(
21
21
  new RegExp(`<script[^>]+src="(?:${dirPattern})[^"]*"[^>]*></script>`, 'g'),
22
- ''
22
+ '',
23
23
  );
24
24
 
25
25
  content = content.replace(
26
26
  new RegExp(`<link[^>]+href="(?:${dirPattern})[^"]*"[^>]*\\/?>`, 'g'),
27
- ''
27
+ '',
28
28
  );
29
29
 
30
30
  content = content.replace(/^[ \t]*\r?\n/gm, '');
@@ -45,34 +45,38 @@ export async function compareDirectories(
45
45
  nodir: true,
46
46
  posix: true,
47
47
  })
48
- ).map(bundleless).sort();
48
+ )
49
+ .map(bundleless)
50
+ .sort();
49
51
 
50
52
  let filesForSnapshot;
51
53
 
52
54
  if (checkBundle) {
53
55
  filesForSnapshot = filesFromOutput;
54
56
  } else {
55
- filesForSnapshot = filesFromOutput.filter(file => uselessFile(file, SYSTEM_DIRS));
57
+ filesForSnapshot = filesFromOutput.filter((file) => uselessFile(file, SYSTEM_DIRS));
56
58
  }
57
59
 
58
60
  // Here we sort the order of the included files after all processing
59
61
  // This is necessary for better test stability
60
62
  // We do not care in what order these files were received and processed
61
63
  // We sort only the final list and put it in the snapshot
62
- filesForSnapshot = filesForSnapshot.map(hashless).sort();
64
+ filesForSnapshot = filesForSnapshot.map(hashless).sort();
63
65
 
64
66
  expect(JSON.stringify(filesForSnapshot, null, 2)).toMatchSnapshot('filelist');
65
67
 
66
68
  if (!ignoreFileContent) {
67
- filesFromOutput.filter(file => uselessFile(file, ['_assets/', ...SYSTEM_DIRS])).forEach((filePath) => {
68
- let content = getFileContent(resolve(outputPath, filePath));
69
+ filesFromOutput
70
+ .filter((file) => uselessFile(file, ['_assets/', ...SYSTEM_DIRS]))
71
+ .forEach((filePath) => {
72
+ let content = getFileContent(resolve(outputPath, filePath));
69
73
 
70
- if (!checkBundle && filePath.endsWith('.html')) {
71
- content = stripSystemLinks(content);
72
- }
74
+ if (!checkBundle && filePath.endsWith('.html')) {
75
+ content = stripSystemLinks(content);
76
+ }
73
77
 
74
- expect(content).toMatchSnapshot();
75
- });
78
+ expect(content).toMatchSnapshot();
79
+ });
76
80
  }
77
81
  }
78
82
 
@@ -3,28 +3,31 @@ import assets from '@diplodoc/cli/manifest';
3
3
  export function platformless(text: string): string {
4
4
  let index = 1;
5
5
 
6
- return hashless(text)
7
- .replace(/\r\n/g, '\n')
8
- // Fix for XML equiv-text attributes in Windows - handle various patterns
9
- .replace(/equiv-text="[\r\n]+&#10;"/g, 'equiv-text="&#10;"')
10
- .replace(/equiv-text="[\r\n]+&amp;#10;"/g, 'equiv-text="&amp;#10;"')
11
- // Also normalize any other attributes that might have line ending issues
12
- .replace(/(ctype|id)="[\r\n]+(.*?)"/g, '$1="$2"')
13
- .replace(/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}/g, 'UUID')
14
- .replace(
15
- /(content"?[:=]{1}[" ]{1}Diplodoc.*? )v\d+\.\d+\.\d+(?:-[\w-]+)?/g,
16
- `$1vDIPLODOC-VERSION`,
17
- )
18
- .replace(/(\\(?![/"'])){1,2}/g, '/')
19
- .replace(
20
- /id=\\"inline-code-id-[a-zA-Z0-9]{8}\\"/g,
21
- () => `id="inline-code-id-${index++}"`
22
- )
6
+ return (
7
+ hashless(text)
8
+ .replace(/\r\n/g, '\n')
9
+ // Fix for XML equiv-text attributes in Windows - handle various patterns
10
+ .replace(/equiv-text="[\r\n]+&#10;"/g, 'equiv-text="&#10;"')
11
+ .replace(/equiv-text="[\r\n]+&amp;#10;"/g, 'equiv-text="&amp;#10;"')
12
+ // Also normalize any other attributes that might have line ending issues
13
+ .replace(/(ctype|id)="[\r\n]+(.*?)"/g, '$1="$2"')
14
+ .replace(/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}/g, 'UUID')
15
+ .replace(
16
+ /(content"?[:=]{1}[" ]{1}Diplodoc.*? )v\d+\.\d+\.\d+(?:-[\w-]+)?/g,
17
+ `$1vDIPLODOC-VERSION`,
18
+ )
19
+ .replace(/(\\(?![/"'])){1,2}/g, '/')
20
+ .replace(
21
+ /id=\\"inline-code-id-[a-zA-Z0-9]{8}\\"/g,
22
+ () => `id="inline-code-id-${index++}"`,
23
+ )
24
+ );
23
25
  }
24
26
 
25
27
  export function hashless(text: string): string {
26
28
  return text
27
29
  .replace(/-[a-z0-9]{12}\./g, '-hash.')
30
+ .replace(/rnd-[a-z0-9]{1,8}__/g, 'rnd-hash__')
28
31
  .replace(/(\/|\\)[a-z0-9]{12,13}-(index|registry|resources)\./g, '/hash-$2.');
29
32
  }
30
33
 
@@ -43,4 +46,3 @@ export function bundleless(text: string): string {
43
46
 
44
47
  return text;
45
48
  }
46
-
@@ -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,20 @@ 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
+
32
+ Link another level
33
+ [{#T}](./includes/level11.md)
34
+
21
35
  ## Header {#header}
22
36
 
23
37
  Content
38
+
39
+ #### 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
+ ```
@@ -0,0 +1,9 @@
1
+ # Level 1 svg header in includes ![Level 1 svg header in includes](../_assets/1.svg)
2
+
3
+ [{#T}](../level1/level1.md)
4
+
5
+ [{#T}](../level1/level2/level2.md)
6
+
7
+ {% include [{#T}](level2/level2.md) %}
8
+
9
+ [{#T}](level11.md)
@@ -0,0 +1 @@
1
+ # Level 11 svg header ![Level 11 svg header](../_assets/1.svg)
@@ -0,0 +1,7 @@
1
+ # Level 2 svg header ![Level 2 svg header](../../_assets/1.svg)
2
+
3
+ [{#T}](../level1.md)
4
+
5
+ [{#T}](../../level0.md)
6
+
7
+ [{#T}](../../level1/level1.md)
@@ -0,0 +1,7 @@
1
+ # Level root svg header ![Level root svg header](_assets/1.svg)
2
+
3
+ [{#T}](images.md)
4
+
5
+ [{#T}](level1/level1.md)
6
+
7
+ [{#T}](level1/level2/level2.md)
@@ -0,0 +1,7 @@
1
+ # Level 1 svg header ![Level 1 svg header](../_assets/1.svg)
2
+
3
+ [{#T}](../level0.md)
4
+
5
+ [{#T}](level2/level2.md)
6
+
7
+ [{#T}](../includes/level11.md)
@@ -0,0 +1,6 @@
1
+ # Level 2 svg header ![Level 2 svg header](../../_assets/1.svg)
2
+
3
+ [{#T}](../level1.md)
4
+
5
+ [{#T}](../../level0.md)
6
+
@@ -0,0 +1,5 @@
1
+ items:
2
+ - name: level1
3
+ href: ./level1
4
+ - name: level2
5
+ href: ./level2/level2
@@ -14,3 +14,11 @@ items:
14
14
  href: ./autotitle
15
15
  - name: includes
16
16
  href: ./includes
17
+ - name: level11
18
+ href: ./includes/level11
19
+ - name: level0
20
+ href: ./level0
21
+ - name: level1
22
+ href: ./level1/level1
23
+ - name: level2
24
+ href: ./level1/level2/level2
@@ -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-rebase-links-in-autotitles-17972680369",
4
4
  "bin": {
5
5
  "diplodoc-cli-test": "bin.mjs"
6
6
  },