@diplodoc/cli-tests 5.36.0 → 5.36.2
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__/files.spec.ts.snap +1 -2
- package/e2e/__snapshots__/merge-includes.spec.ts.snap +241 -30
- package/e2e/__snapshots__/pdf-page.spec.ts.snap +151 -0
- package/e2e/__snapshots__/regression.test.ts.snap +244 -54
- package/e2e/merge-includes.spec.ts +45 -1
- package/e2e/pdf-page.spec.ts +27 -0
- package/mocks/merge-includes/hash-section-html/input/_includes/mixed.md +11 -0
- package/mocks/merge-includes/hash-section-html/input/index.md +3 -0
- package/mocks/merge-includes/hash-section-html/input/main.md +13 -0
- package/mocks/merge-includes/hash-section-html/input/toc.yaml +5 -0
- package/mocks/merge-includes/html-in-list/input/_includes/styles.md +7 -0
- package/mocks/merge-includes/html-in-list/input/index.md +3 -0
- package/mocks/merge-includes/html-in-list/input/main.md +11 -0
- package/mocks/merge-includes/html-in-list/input/toc.yaml +5 -0
- package/mocks/merge-includes/term-extract/input/_includes/chapter.md +7 -0
- package/mocks/merge-includes/term-extract/input/index.md +3 -0
- package/mocks/merge-includes/term-extract/input/main.md +7 -0
- package/mocks/merge-includes/term-extract/input/toc.yaml +5 -0
- package/mocks/merge-includes/yfm-table/input/_includes/cell-content.md +1 -0
- package/mocks/merge-includes/yfm-table/input/index.md +3 -0
- package/mocks/merge-includes/yfm-table/input/main.md +12 -0
- package/mocks/merge-includes/yfm-table/input/toc.yaml +5 -0
- package/mocks/pdf-page/custom-pdf-icon/input/.yfm +6 -0
- package/mocks/pdf-page/custom-pdf-icon/input/_assets/custom-pdf-icon.svg +1 -0
- package/mocks/pdf-page/custom-pdf-icon/input/index.md +1 -0
- package/mocks/pdf-page/custom-pdf-icon/input/pdf/output.pdf +0 -0
- package/mocks/pdf-page/custom-pdf-icon/input/toc.yaml +2 -0
- package/mocks/regression/input/autotitle.md +33 -1
- package/mocks/regression/input/includes/fragments.md +24 -0
- package/mocks/regression/input/includes/styles.md +8 -0
- package/mocks/regression/input/includes.md +9 -0
- package/mocks/regression/input/toc.yaml +2 -0
- package/package.json +1 -1
|
@@ -110,12 +110,11 @@ exports[`Static files from _assets directory > Download link should be enabled 4
|
|
|
110
110
|
<title>Test123</title>
|
|
111
111
|
<meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
|
|
112
112
|
<style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
|
|
113
|
-
<link type="text/css" rel="stylesheet" href="_assets/file-extension.css"/>
|
|
114
113
|
</head>
|
|
115
114
|
<body class="g-root g-root_theme_light">
|
|
116
115
|
<div id="root"></div>
|
|
117
116
|
<script type="application/json" id="diplodoc-state">
|
|
118
|
-
{"data":{"leading":false,"html":"<h3 id=\\"download-static-file\\"><a href=\\"index.html#download-static-file\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Download static file</span></a>Download static file</h3>/n<p>Текст <a href=\\"_assets/test.yaml\\" download=\\"Configuration File\\" class=\\"yfm-file\\"><span class=\\"yfm-file__icon\\"></span>Configuration File</a> потом текст</p>/n<p>Текст <a href=\\"_assets/test.txt\\" download=\\"Configuration File txt\\" class=\\"yfm-file\\"><span class=\\"yfm-file__icon\\"></span>Configuration File txt</a> потом текст</p>/n<p>Текст <a href=\\"_assets/test.docx\\" download=\\"Configuration File txt\\" class=\\"yfm-file\\"><span class=\\"yfm-file__icon\\"></span>Configuration File txt</a> потом текст</p>/n<p>Текст <a href=\\"_assets/test.xlsx\\" download=\\"Configuration File txt\\" class=\\"yfm-file\\"><span class=\\"yfm-file__icon\\"></span>Configuration File txt</a> потом текст</p>/n<p>Текст <a href=\\"_assets/test.csv\\" download=\\"Configuration File txt\\" class=\\"yfm-file\\"><span class=\\"yfm-file__icon\\"></span>Configuration File txt</a> потом текст</p>/n<p>Текс <a href=\\"_assets/test.yaml\\" download=\\"Config\\">Скачать</a> потом текст</p>/n<p>Текс <a href=\\"_assets/test.yaml\\" download=\\"Config\\">Download</a> потом текст</p>/n<p><a href=\\"pc-index.html\\">Link to pc page</a></p>/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"style":[
|
|
117
|
+
{"data":{"leading":false,"html":"<h3 id=\\"download-static-file\\"><a href=\\"index.html#download-static-file\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Download static file</span></a>Download static file</h3>/n<p>Текст <a href=\\"_assets/test.yaml\\" download=\\"Configuration File\\" class=\\"yfm-file\\"><span class=\\"yfm-file__icon\\"></span>Configuration File</a> потом текст</p>/n<p>Текст <a href=\\"_assets/test.txt\\" download=\\"Configuration File txt\\" class=\\"yfm-file\\"><span class=\\"yfm-file__icon\\"></span>Configuration File txt</a> потом текст</p>/n<p>Текст <a href=\\"_assets/test.docx\\" download=\\"Configuration File txt\\" class=\\"yfm-file\\"><span class=\\"yfm-file__icon\\"></span>Configuration File txt</a> потом текст</p>/n<p>Текст <a href=\\"_assets/test.xlsx\\" download=\\"Configuration File txt\\" class=\\"yfm-file\\"><span class=\\"yfm-file__icon\\"></span>Configuration File txt</a> потом текст</p>/n<p>Текст <a href=\\"_assets/test.csv\\" download=\\"Configuration File txt\\" class=\\"yfm-file\\"><span class=\\"yfm-file__icon\\"></span>Configuration File txt</a> потом текст</p>/n<p>Текс <a href=\\"_assets/test.yaml\\" download=\\"Config\\">Скачать</a> потом текст</p>/n<p>Текс <a href=\\"_assets/test.yaml\\" download=\\"Config\\">Download</a> потом текст</p>/n<p><a href=\\"pc-index.html\\">Link to pc page</a></p>/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"style":[],"vcsPath":"index.md"},"headings":[],"title":""},"router":{"pathname":"index","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
|
|
119
118
|
</script>
|
|
120
119
|
<script type="application/javascript">
|
|
121
120
|
const data = document.querySelector('script#diplodoc-state');
|
|
@@ -36,7 +36,6 @@ Content before include.
|
|
|
36
36
|
## Included Section
|
|
37
37
|
|
|
38
38
|
This is the included content.
|
|
39
|
-
|
|
40
39
|
<!-- endsource: _includes/simple.md -->
|
|
41
40
|
|
|
42
41
|
Content after include.
|
|
@@ -111,6 +110,124 @@ path: toc.yaml
|
|
|
111
110
|
"
|
|
112
111
|
`;
|
|
113
112
|
|
|
113
|
+
exports[`Merge includes (md2md) > hash-section-html: hash-section include in list is inlined when only other section has <style> > filelist 1`] = `
|
|
114
|
+
"[
|
|
115
|
+
"index.md",
|
|
116
|
+
"main.md",
|
|
117
|
+
"toc.yaml"
|
|
118
|
+
]"
|
|
119
|
+
`;
|
|
120
|
+
|
|
121
|
+
exports[`Merge includes (md2md) > hash-section-html: hash-section include in list is inlined when only other section has <style> 1`] = `
|
|
122
|
+
"---
|
|
123
|
+
metadata:
|
|
124
|
+
- name: generator
|
|
125
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
126
|
+
vcsPath: index.md
|
|
127
|
+
---
|
|
128
|
+
# Index
|
|
129
|
+
|
|
130
|
+
Welcome page.
|
|
131
|
+
"
|
|
132
|
+
`;
|
|
133
|
+
|
|
134
|
+
exports[`Merge includes (md2md) > hash-section-html: hash-section include in list is inlined when only other section has <style> 2`] = `
|
|
135
|
+
"---
|
|
136
|
+
metadata:
|
|
137
|
+
- name: generator
|
|
138
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
139
|
+
vcsPath: main.md
|
|
140
|
+
---
|
|
141
|
+
# Main Document
|
|
142
|
+
|
|
143
|
+
Content before list.
|
|
144
|
+
|
|
145
|
+
1. First item
|
|
146
|
+
|
|
147
|
+
2. Second item with hash-section include (section has no HTML, but other section in same file does):
|
|
148
|
+
|
|
149
|
+
<!-- source: _includes/mixed.md -->
|
|
150
|
+
Just plain text content without any HTML blocks.
|
|
151
|
+
<!-- endsource: _includes/mixed.md -->
|
|
152
|
+
|
|
153
|
+
3. Third item
|
|
154
|
+
|
|
155
|
+
Content after list.
|
|
156
|
+
"
|
|
157
|
+
`;
|
|
158
|
+
|
|
159
|
+
exports[`Merge includes (md2md) > hash-section-html: hash-section include in list is inlined when only other section has <style> 3`] = `
|
|
160
|
+
"title: Merge Includes Hash Section HTML
|
|
161
|
+
href: index.md
|
|
162
|
+
items:
|
|
163
|
+
- name: Main
|
|
164
|
+
href: main.md
|
|
165
|
+
path: toc.yaml
|
|
166
|
+
"
|
|
167
|
+
`;
|
|
168
|
+
|
|
169
|
+
exports[`Merge includes (md2md) > html-in-list: include with <style> in list (any indent) uses fallback > filelist 1`] = `
|
|
170
|
+
"[
|
|
171
|
+
"index.md",
|
|
172
|
+
"main.md",
|
|
173
|
+
"toc.yaml"
|
|
174
|
+
]"
|
|
175
|
+
`;
|
|
176
|
+
|
|
177
|
+
exports[`Merge includes (md2md) > html-in-list: include with <style> in list (any indent) uses fallback 1`] = `
|
|
178
|
+
"---
|
|
179
|
+
metadata:
|
|
180
|
+
- name: generator
|
|
181
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
182
|
+
vcsPath: index.md
|
|
183
|
+
---
|
|
184
|
+
# Index
|
|
185
|
+
|
|
186
|
+
Welcome page.
|
|
187
|
+
"
|
|
188
|
+
`;
|
|
189
|
+
|
|
190
|
+
exports[`Merge includes (md2md) > html-in-list: include with <style> in list (any indent) uses fallback 2`] = `
|
|
191
|
+
"---
|
|
192
|
+
metadata:
|
|
193
|
+
- name: generator
|
|
194
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
195
|
+
vcsPath: main.md
|
|
196
|
+
---
|
|
197
|
+
# Main Document
|
|
198
|
+
|
|
199
|
+
Content before list.
|
|
200
|
+
|
|
201
|
+
- List item with inline include (any non-zero indent → HTML block must use fallback)
|
|
202
|
+
|
|
203
|
+
{% include [styles](_includes/styles.md) %}
|
|
204
|
+
|
|
205
|
+
- Another list item
|
|
206
|
+
|
|
207
|
+
Content after list.
|
|
208
|
+
|
|
209
|
+
{% included (_includes/styles.md) %}
|
|
210
|
+
<style>
|
|
211
|
+
|
|
212
|
+
.yfm .highlight {
|
|
213
|
+
background: yellow;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
</style>
|
|
217
|
+
|
|
218
|
+
{% endincluded %}"
|
|
219
|
+
`;
|
|
220
|
+
|
|
221
|
+
exports[`Merge includes (md2md) > html-in-list: include with <style> in list (any indent) uses fallback 3`] = `
|
|
222
|
+
"title: Merge Includes HTML in List
|
|
223
|
+
href: index.md
|
|
224
|
+
items:
|
|
225
|
+
- name: Main
|
|
226
|
+
href: main.md
|
|
227
|
+
path: toc.yaml
|
|
228
|
+
"
|
|
229
|
+
`;
|
|
230
|
+
|
|
114
231
|
exports[`Merge includes (md2md) > inline-context: non-standalone includes use fallback > filelist 1`] = `
|
|
115
232
|
"[
|
|
116
233
|
"index.md",
|
|
@@ -228,20 +345,17 @@ Before outer include.
|
|
|
228
345
|
|
|
229
346
|
Content from outer include.
|
|
230
347
|
|
|
231
|
-
|
|
348
|
+
<!-- source: _includes/inner.md -->
|
|
349
|
+
### Inner Section
|
|
232
350
|
|
|
233
|
-
|
|
351
|
+
Content from inner include.
|
|
352
|
+
<!-- endsource: _includes/inner.md -->
|
|
234
353
|
|
|
354
|
+
End of outer include.
|
|
235
355
|
<!-- endsource: _includes/outer.md -->
|
|
236
356
|
|
|
237
357
|
After outer include.
|
|
238
|
-
|
|
239
|
-
{% included (_includes/inner.md) %}
|
|
240
|
-
### Inner Section
|
|
241
|
-
|
|
242
|
-
Content from inner include.
|
|
243
|
-
|
|
244
|
-
{% endincluded %}"
|
|
358
|
+
"
|
|
245
359
|
`;
|
|
246
360
|
|
|
247
361
|
exports[`Merge includes (md2md) > nested: outer inlined, inner as fallback 3`] = `
|
|
@@ -292,7 +406,6 @@ See [the guide](_includes/guide.md) for more details.
|
|
|
292
406
|

|
|
293
407
|
|
|
294
408
|
[ref-link]: _includes/reference.md "Reference"
|
|
295
|
-
|
|
296
409
|
<!-- endsource: _includes/sub/with-links.md -->
|
|
297
410
|
"
|
|
298
411
|
`;
|
|
@@ -307,6 +420,59 @@ path: toc.yaml
|
|
|
307
420
|
"
|
|
308
421
|
`;
|
|
309
422
|
|
|
423
|
+
exports[`Merge includes (md2md) > term-extract: dep with terms → terms extracted, content inlined (Step 4) > filelist 1`] = `
|
|
424
|
+
"[
|
|
425
|
+
"index.md",
|
|
426
|
+
"main.md",
|
|
427
|
+
"toc.yaml"
|
|
428
|
+
]"
|
|
429
|
+
`;
|
|
430
|
+
|
|
431
|
+
exports[`Merge includes (md2md) > term-extract: dep with terms → terms extracted, content inlined (Step 4) 1`] = `
|
|
432
|
+
"---
|
|
433
|
+
metadata:
|
|
434
|
+
- name: generator
|
|
435
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
436
|
+
vcsPath: index.md
|
|
437
|
+
---
|
|
438
|
+
# Index
|
|
439
|
+
|
|
440
|
+
Welcome page.
|
|
441
|
+
"
|
|
442
|
+
`;
|
|
443
|
+
|
|
444
|
+
exports[`Merge includes (md2md) > term-extract: dep with terms → terms extracted, content inlined (Step 4) 2`] = `
|
|
445
|
+
"---
|
|
446
|
+
metadata:
|
|
447
|
+
- name: generator
|
|
448
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
449
|
+
vcsPath: main.md
|
|
450
|
+
---
|
|
451
|
+
# API Docs
|
|
452
|
+
|
|
453
|
+
Use the [API](*api) and [SDK](*sdk) to build apps.
|
|
454
|
+
|
|
455
|
+
<!-- source: _includes/chapter.md -->
|
|
456
|
+
## Chapter
|
|
457
|
+
|
|
458
|
+
Chapter content with [link](_includes/local.md).
|
|
459
|
+
<!-- endsource: _includes/chapter.md -->
|
|
460
|
+
|
|
461
|
+
[*api]: Application Programming Interface
|
|
462
|
+
|
|
463
|
+
[*sdk]: Software Development Kit"
|
|
464
|
+
`;
|
|
465
|
+
|
|
466
|
+
exports[`Merge includes (md2md) > term-extract: dep with terms → terms extracted, content inlined (Step 4) 3`] = `
|
|
467
|
+
"title: Merge Includes Term Extract
|
|
468
|
+
href: index.md
|
|
469
|
+
items:
|
|
470
|
+
- name: Main
|
|
471
|
+
href: main.md
|
|
472
|
+
path: toc.yaml
|
|
473
|
+
"
|
|
474
|
+
`;
|
|
475
|
+
|
|
310
476
|
exports[`Merge includes (md2md) > term-inline: includes inside term defs use fallback (not inlined) > filelist 1`] = `
|
|
311
477
|
"[
|
|
312
478
|
"index.md",
|
|
@@ -351,37 +517,26 @@ vcsPath: main.md
|
|
|
351
517
|
Обязательный параметр.
|
|
352
518
|
<!-- endsource: _includes/defs.md -->
|
|
353
519
|
|
|
354
|
-
[*placeID]:
|
|
355
|
-
|
|
356
|
-
[*syncFactor]: {% include notitle [desc](_includes/defs.md#syncFactor) %}
|
|
357
|
-
|
|
358
|
-
[*requiredParam]: {% include notitle [desc](_includes/defs.md#requiredParam) %}
|
|
359
|
-
|
|
360
|
-
{% include notitle [note](_includes/defs.md#placeID) %}
|
|
361
|
-
|
|
362
|
-
{% included (_includes/defs.md) %}
|
|
363
|
-
## PlaceID {#placeID}
|
|
364
|
-
|
|
365
|
-
ID площадки.
|
|
520
|
+
[*placeID]: ID площадки.
|
|
366
521
|
|
|
367
522
|
Читайте также:
|
|
368
523
|
|
|
369
|
-
- [Получить список](
|
|
370
|
-
|
|
371
|
-
## SyncFactor {#syncFactor}
|
|
524
|
+
- [Получить список](list.md)
|
|
372
525
|
|
|
373
|
-
Вид кода.
|
|
526
|
+
[*syncFactor]: Вид кода.
|
|
374
527
|
|
|
375
528
|
Допустимые значения:
|
|
376
529
|
|
|
377
530
|
- \`1\` — асинхронный;
|
|
378
531
|
- \`2\` — синхронный.
|
|
379
532
|
|
|
380
|
-
|
|
533
|
+
[*requiredParam]: Обязательный параметр.
|
|
534
|
+
|
|
535
|
+
ID площадки.
|
|
381
536
|
|
|
382
|
-
|
|
537
|
+
Читайте также:
|
|
383
538
|
|
|
384
|
-
|
|
539
|
+
- [Получить список](list.md)"
|
|
385
540
|
`;
|
|
386
541
|
|
|
387
542
|
exports[`Merge includes (md2md) > term-inline: includes inside term defs use fallback (not inlined) 3`] = `
|
|
@@ -449,3 +604,59 @@ items:
|
|
|
449
604
|
path: toc.yaml
|
|
450
605
|
"
|
|
451
606
|
`;
|
|
607
|
+
|
|
608
|
+
exports[`Merge includes (md2md) > yfm-table: include followed by || separator is inlined > filelist 1`] = `
|
|
609
|
+
"[
|
|
610
|
+
"index.md",
|
|
611
|
+
"main.md",
|
|
612
|
+
"toc.yaml"
|
|
613
|
+
]"
|
|
614
|
+
`;
|
|
615
|
+
|
|
616
|
+
exports[`Merge includes (md2md) > yfm-table: include followed by || separator is inlined 1`] = `
|
|
617
|
+
"---
|
|
618
|
+
metadata:
|
|
619
|
+
- name: generator
|
|
620
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
621
|
+
vcsPath: index.md
|
|
622
|
+
---
|
|
623
|
+
# Index
|
|
624
|
+
|
|
625
|
+
Welcome page.
|
|
626
|
+
"
|
|
627
|
+
`;
|
|
628
|
+
|
|
629
|
+
exports[`Merge includes (md2md) > yfm-table: include followed by || separator is inlined 2`] = `
|
|
630
|
+
"---
|
|
631
|
+
metadata:
|
|
632
|
+
- name: generator
|
|
633
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
634
|
+
vcsPath: main.md
|
|
635
|
+
---
|
|
636
|
+
# Main Document
|
|
637
|
+
|
|
638
|
+
#|
|
|
639
|
+
|| **Option** | **Details** ||
|
|
640
|
+
|| Option A |
|
|
641
|
+
Some description of option A.
|
|
642
|
+
|
|
643
|
+
<!-- source: _includes/cell-content.md -->
|
|
644
|
+
Buy now at [our store](https://example.com/store).
|
|
645
|
+
<!-- endsource: _includes/cell-content.md -->
|
|
646
|
+
||
|
|
647
|
+
|| Option B | Plain text cell. ||
|
|
648
|
+
|#
|
|
649
|
+
|
|
650
|
+
Content after table.
|
|
651
|
+
"
|
|
652
|
+
`;
|
|
653
|
+
|
|
654
|
+
exports[`Merge includes (md2md) > yfm-table: include followed by || separator is inlined 3`] = `
|
|
655
|
+
"title: Merge Includes YFM Table
|
|
656
|
+
href: index.md
|
|
657
|
+
items:
|
|
658
|
+
- name: Main
|
|
659
|
+
href: main.md
|
|
660
|
+
path: toc.yaml
|
|
661
|
+
"
|
|
662
|
+
`;
|
|
@@ -130,6 +130,157 @@ exports[`Pdf page mode > creates pdf-page.json for each standalone toc > filelis
|
|
|
130
130
|
]"
|
|
131
131
|
`;
|
|
132
132
|
|
|
133
|
+
exports[`Pdf page with custom icon > md2html copies all files and produces correct pdfIconConfig in __DATA__ > filelist 1`] = `
|
|
134
|
+
"[
|
|
135
|
+
".yfm",
|
|
136
|
+
"_assets/custom-pdf-icon.svg",
|
|
137
|
+
"index.html",
|
|
138
|
+
"pdf/output.pdf",
|
|
139
|
+
"toc.js"
|
|
140
|
+
]"
|
|
141
|
+
`;
|
|
142
|
+
|
|
143
|
+
exports[`Pdf page with custom icon > md2html copies all files and produces correct pdfIconConfig in __DATA__ 1`] = `
|
|
144
|
+
"pdf:
|
|
145
|
+
enabled: true
|
|
146
|
+
size: M
|
|
147
|
+
position: header
|
|
148
|
+
icon: _assets/custom-pdf-icon.svg
|
|
149
|
+
pdfFileUrl: pdf/output.pdf"
|
|
150
|
+
`;
|
|
151
|
+
|
|
152
|
+
exports[`Pdf page with custom icon > md2html copies all files and produces correct pdfIconConfig in __DATA__ 2`] = `
|
|
153
|
+
"<!DOCTYPE html>
|
|
154
|
+
<html lang="ru" dir="ltr">
|
|
155
|
+
<head>
|
|
156
|
+
<meta charset="utf-8">
|
|
157
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
158
|
+
<base href="./" />
|
|
159
|
+
<title>PDF mock index | Pdf custom link</title>
|
|
160
|
+
<meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
|
|
161
|
+
<style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
|
|
162
|
+
</head>
|
|
163
|
+
<body class="g-root g-root_theme_light">
|
|
164
|
+
<div id="root"></div>
|
|
165
|
+
<script type="application/json" id="diplodoc-state">
|
|
166
|
+
{"data":{"leading":false,"html":"","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"vcsPath":"index.md"},"headings":[],"title":"PDF mock index","pdfLink":"pdf/output.pdf","pdfIconConfig":{"icon":"_assets/custom-pdf-icon.svg","position":"header","size":"M"}},"router":{"pathname":"index","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
|
|
167
|
+
</script>
|
|
168
|
+
<script type="application/javascript">
|
|
169
|
+
const data = document.querySelector('script#diplodoc-state');
|
|
170
|
+
window.__DATA__ = JSON.parse((function unescape(string) {
|
|
171
|
+
return string.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
172
|
+
})(data.innerText));
|
|
173
|
+
window.STATIC_CONTENT = false;
|
|
174
|
+
</script>
|
|
175
|
+
<script type="application/javascript" defer src="toc.js"></script>
|
|
176
|
+
</body>
|
|
177
|
+
</html>"
|
|
178
|
+
`;
|
|
179
|
+
|
|
180
|
+
exports[`Pdf page with custom icon > md2html copies all files and produces correct pdfIconConfig in __DATA__ 3`] = `
|
|
181
|
+
"%PDF-1.7
|
|
182
|
+
%����
|
|
183
|
+
4 0 obj
|
|
184
|
+
<< /Length 5 0 R
|
|
185
|
+
/Filter /FlateDecode
|
|
186
|
+
>>
|
|
187
|
+
stream
|
|
188
|
+
x�3T0B]C afl�g����U��5T�
|
|
189
|
+
endstream
|
|
190
|
+
endobj
|
|
191
|
+
5 0 obj
|
|
192
|
+
29
|
|
193
|
+
endobj
|
|
194
|
+
3 0 obj
|
|
195
|
+
<<
|
|
196
|
+
>>
|
|
197
|
+
endobj
|
|
198
|
+
7 0 obj
|
|
199
|
+
<< /Type /ObjStm
|
|
200
|
+
/Length 8 0 R
|
|
201
|
+
/N 1
|
|
202
|
+
/First 4
|
|
203
|
+
/Filter /FlateDecode
|
|
204
|
+
>>
|
|
205
|
+
stream
|
|
206
|
+
x�3S0����8]
|
|
207
|
+
endstream
|
|
208
|
+
endobj
|
|
209
|
+
8 0 obj
|
|
210
|
+
16
|
|
211
|
+
endobj
|
|
212
|
+
9 0 obj
|
|
213
|
+
<< /Type /ObjStm
|
|
214
|
+
/Length 12 0 R
|
|
215
|
+
/N 4
|
|
216
|
+
/First 23
|
|
217
|
+
/Filter /FlateDecode
|
|
218
|
+
>>
|
|
219
|
+
stream
|
|
220
|
+
x�U�_k�0����eLh�t+҇Z(c��m�!�\`�a$�c��K�v�<���å %�I�@sP�t��%��u�Hj�IH����
|
|
221
|
+
>gT�i���n7+j��IH�P�^+И>����&�L;��K/L�tE�7Zr۫���Dx�2�
|
|
222
|
+
���t��O�=�&��ଽ��Z�>��e���qq�{YV�,G��8�'��dw�Q�iDY��ϋ�LWtrT����P/W�
|
|
223
|
+
�'�N��:��^�������FMZH���yrBa��Ɲ�_NJ[���[Ew�[C��^o�
|
|
224
|
+
endstream
|
|
225
|
+
endobj
|
|
226
|
+
12 0 obj
|
|
227
|
+
282
|
|
228
|
+
endobj
|
|
229
|
+
13 0 obj
|
|
230
|
+
<< /Type /XRef
|
|
231
|
+
/Length 58
|
|
232
|
+
/Filter /FlateDecode
|
|
233
|
+
/Size 14
|
|
234
|
+
/W [1 2 2]
|
|
235
|
+
/Root 11 0 R
|
|
236
|
+
/Info 10 0 R
|
|
237
|
+
>>
|
|
238
|
+
stream
|
|
239
|
+
x�c\`\`�������D012�1002���J�;��H0��+�:F���t(�t���M
|
|
240
|
+
endstream
|
|
241
|
+
endobj
|
|
242
|
+
startxref
|
|
243
|
+
735
|
|
244
|
+
%%EOF
|
|
245
|
+
%BeginExifToolUpdate
|
|
246
|
+
10 0 obj
|
|
247
|
+
<<
|
|
248
|
+
/CreationDate (D:20260423161755+02'00)
|
|
249
|
+
>>
|
|
250
|
+
endobj
|
|
251
|
+
14 0 obj
|
|
252
|
+
<<
|
|
253
|
+
/Type /XRef
|
|
254
|
+
/Length 21
|
|
255
|
+
/Size 15
|
|
256
|
+
/W [ 1 4 2 ]
|
|
257
|
+
/Root 11 0 R
|
|
258
|
+
/Info 10 0 R
|
|
259
|
+
/Index [ 0 1 10 1 14 1 ]
|
|
260
|
+
/Prev 735
|
|
261
|
+
>>
|
|
262
|
+
stream
|
|
263
|
+
���
|
|
264
|
+
endstream
|
|
265
|
+
endobj
|
|
266
|
+
%EndExifToolUpdate 961
|
|
267
|
+
startxref
|
|
268
|
+
1043
|
|
269
|
+
%%EOF
|
|
270
|
+
"
|
|
271
|
+
`;
|
|
272
|
+
|
|
273
|
+
exports[`Pdf page with custom icon > md2html copies all files and produces correct pdfIconConfig in __DATA__ 4`] = `"window.__DATA__.data.toc = {"title":"Pdf custom link","href":"index.html","path":"toc.yaml","id":"UUID"};"`;
|
|
274
|
+
|
|
275
|
+
exports[`Pdf page with custom icon > md2md copies custom pdf icon asset to output > filelist 1`] = `
|
|
276
|
+
"[
|
|
277
|
+
".yfm",
|
|
278
|
+
"_assets/custom-pdf-icon.svg",
|
|
279
|
+
"index.md",
|
|
280
|
+
"toc.yaml"
|
|
281
|
+
]"
|
|
282
|
+
`;
|
|
283
|
+
|
|
133
284
|
exports[`Pdf page with titles > Generates content for pdf genrator with title pages > filelist 1`] = `
|
|
134
285
|
"[
|
|
135
286
|
"pdf-page-toc.js",
|