@diplodoc/cli-tests 5.36.6 → 5.37.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.
- package/e2e/__snapshots__/include-toc.test.ts.snap +108 -1
- package/e2e/__snapshots__/merge-includes.spec.ts.snap +1 -4
- package/e2e/include-toc.test.ts +6 -0
- package/mocks/include-toc/test10/input/test/index.md +4 -0
- package/mocks/include-toc/test10/input/test/sub/index.md +1 -0
- package/mocks/include-toc/test10/input/test/sub/sub/sub-3.md +1 -0
- package/mocks/include-toc/test10/input/test/sub/sub-1.md +5 -0
- package/mocks/include-toc/test10/input/test/sub/sub-2.md +1 -0
- package/mocks/include-toc/test10/input/test/test.md +1 -0
- package/mocks/include-toc/test10/input/toc.yaml +9 -0
- package/package.json +1 -1
|
@@ -598,6 +598,7 @@ items:
|
|
|
598
598
|
- name: index
|
|
599
599
|
href: test/index.md
|
|
600
600
|
- name: sub
|
|
601
|
+
href: test/sub/index.md
|
|
601
602
|
items:
|
|
602
603
|
- name: sub-2
|
|
603
604
|
href: test/sub/sub-2.md
|
|
@@ -607,7 +608,6 @@ items:
|
|
|
607
608
|
items:
|
|
608
609
|
- name: sub-3
|
|
609
610
|
href: test/sub/sub/sub-3.md
|
|
610
|
-
href: test/sub/index.md
|
|
611
611
|
path: toc.yaml
|
|
612
612
|
"
|
|
613
613
|
`;
|
|
@@ -715,3 +715,110 @@ items:
|
|
|
715
715
|
path: toc.yaml
|
|
716
716
|
"
|
|
717
717
|
`;
|
|
718
|
+
|
|
719
|
+
exports[`Include toc > Toc with generic includer linkIndexAutotitle uses index.md heading for directory > filelist 1`] = `
|
|
720
|
+
"[
|
|
721
|
+
"test/index.md",
|
|
722
|
+
"test/sub/index.md",
|
|
723
|
+
"test/sub/sub-1.md",
|
|
724
|
+
"test/sub/sub-2.md",
|
|
725
|
+
"test/sub/sub/sub-3.md",
|
|
726
|
+
"test/test.md",
|
|
727
|
+
"toc.yaml"
|
|
728
|
+
]"
|
|
729
|
+
`;
|
|
730
|
+
|
|
731
|
+
exports[`Include toc > Toc with generic includer linkIndexAutotitle uses index.md heading for directory 1`] = `
|
|
732
|
+
"---
|
|
733
|
+
metadata:
|
|
734
|
+
- name: generator
|
|
735
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
736
|
+
vcsPath: test/index.md
|
|
737
|
+
---
|
|
738
|
+
# Root index
|
|
739
|
+
|
|
740
|
+
[same level link](./test.md)
|
|
741
|
+
[inner link](./sub/sub-1.md)
|
|
742
|
+
"
|
|
743
|
+
`;
|
|
744
|
+
|
|
745
|
+
exports[`Include toc > Toc with generic includer linkIndexAutotitle uses index.md heading for directory 2`] = `
|
|
746
|
+
"---
|
|
747
|
+
metadata:
|
|
748
|
+
- name: generator
|
|
749
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
750
|
+
vcsPath: test/sub/index.md
|
|
751
|
+
---
|
|
752
|
+
# Sub section
|
|
753
|
+
"
|
|
754
|
+
`;
|
|
755
|
+
|
|
756
|
+
exports[`Include toc > Toc with generic includer linkIndexAutotitle uses index.md heading for directory 3`] = `
|
|
757
|
+
"---
|
|
758
|
+
metadata:
|
|
759
|
+
- name: generator
|
|
760
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
761
|
+
vcsPath: test/sub/sub-1.md
|
|
762
|
+
---
|
|
763
|
+
# Sub one
|
|
764
|
+
|
|
765
|
+
[same level link](./sub-2.md)
|
|
766
|
+
[outer link](../test.md)
|
|
767
|
+
[inner link](./sub/sub-3.md)
|
|
768
|
+
"
|
|
769
|
+
`;
|
|
770
|
+
|
|
771
|
+
exports[`Include toc > Toc with generic includer linkIndexAutotitle uses index.md heading for directory 4`] = `
|
|
772
|
+
"---
|
|
773
|
+
metadata:
|
|
774
|
+
- name: generator
|
|
775
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
776
|
+
vcsPath: test/sub/sub-2.md
|
|
777
|
+
---
|
|
778
|
+
# Sub two
|
|
779
|
+
"
|
|
780
|
+
`;
|
|
781
|
+
|
|
782
|
+
exports[`Include toc > Toc with generic includer linkIndexAutotitle uses index.md heading for directory 5`] = `
|
|
783
|
+
"---
|
|
784
|
+
metadata:
|
|
785
|
+
- name: generator
|
|
786
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
787
|
+
vcsPath: test/sub/sub/sub-3.md
|
|
788
|
+
---
|
|
789
|
+
# Sub three
|
|
790
|
+
"
|
|
791
|
+
`;
|
|
792
|
+
|
|
793
|
+
exports[`Include toc > Toc with generic includer linkIndexAutotitle uses index.md heading for directory 6`] = `
|
|
794
|
+
"---
|
|
795
|
+
metadata:
|
|
796
|
+
- name: generator
|
|
797
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
798
|
+
vcsPath: test/test.md
|
|
799
|
+
---
|
|
800
|
+
# Test page
|
|
801
|
+
"
|
|
802
|
+
`;
|
|
803
|
+
|
|
804
|
+
exports[`Include toc > Toc with generic includer linkIndexAutotitle uses index.md heading for directory 7`] = `
|
|
805
|
+
"title: main
|
|
806
|
+
items:
|
|
807
|
+
- name: Test page
|
|
808
|
+
href: test/test.md
|
|
809
|
+
- name: Root index
|
|
810
|
+
href: test/index.md
|
|
811
|
+
- href: test/sub/index.md
|
|
812
|
+
items:
|
|
813
|
+
- name: Sub two
|
|
814
|
+
href: test/sub/sub-2.md
|
|
815
|
+
- name: Sub one
|
|
816
|
+
href: test/sub/sub-1.md
|
|
817
|
+
- name: sub
|
|
818
|
+
items:
|
|
819
|
+
- name: Sub three
|
|
820
|
+
href: test/sub/sub/sub-3.md
|
|
821
|
+
name: Sub section
|
|
822
|
+
path: toc.yaml
|
|
823
|
+
"
|
|
824
|
+
`;
|
|
@@ -640,10 +640,7 @@ vcsPath: main.md
|
|
|
640
640
|
|| Option A |
|
|
641
641
|
Some description of option A.
|
|
642
642
|
|
|
643
|
-
|
|
644
|
-
Buy now at [our store](https://example.com/store).
|
|
645
|
-
<!-- endsource: _includes/cell-content.md -->
|
|
646
|
-
||
|
|
643
|
+
Buy now at [our store](https://example.com/store).||
|
|
647
644
|
|| Option B | Plain text cell. ||
|
|
648
645
|
|#
|
|
649
646
|
|
package/e2e/include-toc.test.ts
CHANGED
|
@@ -64,4 +64,10 @@ describe('Include toc', () => {
|
|
|
64
64
|
await TestAdapter.testBuildPass(inputPath, outputPath);
|
|
65
65
|
await compareDirectories(outputPath);
|
|
66
66
|
});
|
|
67
|
+
|
|
68
|
+
test('Toc with generic includer linkIndexAutotitle uses index.md heading for directory', async () => {
|
|
69
|
+
const {inputPath, outputPath} = getTestPaths('mocks/include-toc/test10');
|
|
70
|
+
await TestAdapter.testBuildPass(inputPath, outputPath);
|
|
71
|
+
await compareDirectories(outputPath);
|
|
72
|
+
});
|
|
67
73
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Sub section
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Sub three
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Sub two
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Test page
|