@diplodoc/cli-tests 5.12.5 → 5.13.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 (31) hide show
  1. package/e2e/__snapshots__/pdf-page.spec.ts.snap +3 -3
  2. package/e2e/__snapshots__/preprocess.test.ts.snap +52 -19
  3. package/e2e/__snapshots__/skip-html-extension.spec.ts.snap +381 -14
  4. package/e2e/skip-html-extension.spec.ts +16 -4
  5. package/mocks/pdf-page/flag-enabled/input/__includes/include1.md +3 -0
  6. package/mocks/pdf-page/flag-enabled/input/index.md +1 -0
  7. package/mocks/pdf-page/flag-enabled/input/page1.md +3 -0
  8. package/mocks/pdf-page/flag-enabled/input/syntax/test.md +1 -0
  9. package/mocks/pdf-page/flag-enabled/input/toc.yaml +2 -0
  10. package/mocks/preprocess/input/images.md +20 -9
  11. package/mocks/skip-html-extension/multilingual/input/.yfm +2 -0
  12. package/mocks/skip-html-extension/multilingual/input/en/folder/index.md +1 -0
  13. package/mocks/skip-html-extension/multilingual/input/en/index-test-html/index.md +4 -0
  14. package/mocks/skip-html-extension/multilingual/input/en/index.md +6 -0
  15. package/mocks/skip-html-extension/multilingual/input/en/page1.md +3 -0
  16. package/mocks/skip-html-extension/multilingual/input/en/page2.md +6 -0
  17. package/mocks/skip-html-extension/multilingual/input/en/toc.yaml +13 -0
  18. package/mocks/skip-html-extension/multilingual/input/ru/folder/index.md +1 -0
  19. package/mocks/skip-html-extension/multilingual/input/ru/index-test-html/index.md +4 -0
  20. package/mocks/skip-html-extension/multilingual/input/ru/index.md +5 -0
  21. package/mocks/skip-html-extension/multilingual/input/ru/page1.md +3 -0
  22. package/mocks/skip-html-extension/multilingual/input/ru/page2.md +6 -0
  23. package/mocks/skip-html-extension/multilingual/input/ru/toc.yaml +12 -0
  24. package/package.json +1 -1
  25. /package/mocks/skip-html-extension/{input → monolingual/input}/.yfm +0 -0
  26. /package/mocks/skip-html-extension/{input → monolingual/input}/folder/index.md +0 -0
  27. /package/mocks/skip-html-extension/{input → monolingual/input}/index-test-html/index.md +0 -0
  28. /package/mocks/skip-html-extension/{input → monolingual/input}/index.md +0 -0
  29. /package/mocks/skip-html-extension/{input → monolingual/input}/page1.md +0 -0
  30. /package/mocks/skip-html-extension/{input → monolingual/input}/page2.md +0 -0
  31. /package/mocks/skip-html-extension/{input → monolingual/input}/toc.yaml +0 -0
@@ -48,7 +48,7 @@ exports[`Pdf page mode > creates a pdf folder when the --pdf flag is specified >
48
48
  ]"
49
49
  `;
50
50
 
51
- exports[`Pdf page mode > creates a pdf folder when the --pdf flag is specified 1`] = `"window.__DATA__.data.toc = {"title":"Skip html extension","href":"#index","items":[{"name":"Title 1","href":"#page1","id":"UUID"}],"path":"toc.yaml","id":"UUID"};"`;
51
+ exports[`Pdf page mode > creates a pdf folder when the --pdf flag is specified 1`] = `"window.__DATA__.data.toc = {"title":"Skip html extension","href":"#index","items":[{"name":"Syntax","href":"#syntax_test","id":"UUID"},{"name":"Title 1","href":"#page1","id":"UUID"}],"path":"toc.yaml","id":"UUID"};"`;
52
52
 
53
53
  exports[`Pdf page mode > creates a pdf folder when the --pdf flag is specified 2`] = `
54
54
  "<!DOCTYPE html>
@@ -64,7 +64,7 @@ exports[`Pdf page mode > creates a pdf folder when the --pdf flag is specified 2
64
64
  <body class="g-root g-root_theme_light">
65
65
  <div id="root"></div>
66
66
  <script type="application/json" id="diplodoc-state">
67
- {"data":{"leading":false,"html":"&lt;h2 data-original-article=\\"index.html\\"&gt;Header&lt;a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#index\\" id=\\"index\\"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Content&lt;/p&gt;/n&lt;p&gt;&lt;a href=\\"#page1\\"&gt;Link 1&lt;/a&gt;&lt;br&gt;/n&lt;a href=\\"page2.html\\"&gt;Link 2&lt;/a&gt;&lt;/p&gt;/n&lt;hr class=\\"yfm-page__delimeter\\"&gt;&lt;h2 data-original-article=\\"page1.html\\"&gt;Page 1&lt;a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#page1\\" id=\\"page1\\"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;a href=\\"page2.html#hash\\"&gt;Link&lt;/a&gt;&lt;/p&gt;/n","headings":[],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"Skip html extension"},"router":{"pathname":"pdf-page","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
67
+ {"data":{"leading":false,"html":"&lt;h2 data-original-article=\\"index.html\\"&gt;Header&lt;a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#index\\" id=\\"index\\"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Content&lt;/p&gt;/n&lt;p&gt;&lt;a href=\\"#page1\\"&gt;Link 1&lt;/a&gt;&lt;br&gt;/n&lt;a href=\\"page2.html\\"&gt;Link 2&lt;/a&gt;&lt;/p&gt;/n&lt;hr class=\\"yfm-page__delimeter\\"&gt;&lt;h2 id=\\"syntax_test_syntax-page\\" data-original-article=\\"syntax/test.html\\"&gt;&lt;a href=\\"#syntax_test_syntax-page\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"&gt;&lt;span class=\\"visually-hidden\\" data-no-index=\\"true\\"&gt;Syntax page&lt;/span&gt;&lt;/a&gt;Syntax page&lt;a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#syntax_test\\" id=\\"syntax_test\\"&gt;&lt;/a&gt;&lt;/h2&gt;/n&lt;hr class=\\"yfm-page__delimeter\\"&gt;&lt;h2 data-original-article=\\"page1.html\\"&gt;Page 1&lt;a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#page1\\" id=\\"page1\\"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;a href=\\"page2.html#hash\\"&gt;Link&lt;/a&gt;&lt;/p&gt;/n&lt;h4 id=\\"page1_include-link-page\\"&gt;&lt;a href=\\"#page1_include-link-page\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"&gt;&lt;span class=\\"visually-hidden\\" data-no-index=\\"true\\"&gt;Include link page&lt;/span&gt;&lt;/a&gt;Include link page&lt;/h4&gt;/n&lt;p&gt;&lt;a href=\\"../syntax/test.html\\"&gt;link&lt;/a&gt;&lt;/p&gt;/n","headings":[],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"Skip html extension"},"router":{"pathname":"pdf-page","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
68
68
  </script>
69
69
  <script type="application/javascript">
70
70
  const data = document.querySelector('script#diplodoc-state');
@@ -78,4 +78,4 @@ exports[`Pdf page mode > creates a pdf folder when the --pdf flag is specified 2
78
78
  </html>"
79
79
  `;
80
80
 
81
- exports[`Pdf page mode > creates a pdf folder when the --pdf flag is specified 3`] = `"{"data":{"leading":false,"html":"<h2 data-original-article=\\"index.html\\">Header<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#index\\" id=\\"index\\"></a></h2><p>Content</p>/n<p><a href=\\"#page1\\">Link 1</a><br>/n<a href=\\"page2.html\\">Link 2</a></p>/n<hr class=\\"yfm-page__delimeter\\"><h2 data-original-article=\\"page1.html\\">Page 1<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#page1\\" id=\\"page1\\"></a></h2><p><a href=\\"page2.html#hash\\">Link</a></p>/n","headings":[],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"Skip html extension","toc":{"title":"Skip html extension","href":"index.html","items":[{"name":"Title 1","href":"page1.html","id":"UUID"}],"path":"toc.yaml","id":"UUID"}},"router":{"pathname":"pdf-page","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}"`;
81
+ exports[`Pdf page mode > creates a pdf folder when the --pdf flag is specified 3`] = `"{"data":{"leading":false,"html":"<h2 data-original-article=\\"index.html\\">Header<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#index\\" id=\\"index\\"></a></h2><p>Content</p>/n<p><a href=\\"#page1\\">Link 1</a><br>/n<a href=\\"page2.html\\">Link 2</a></p>/n<hr class=\\"yfm-page__delimeter\\"><h2 id=\\"syntax_test_syntax-page\\" data-original-article=\\"syntax/test.html\\"><a href=\\"#syntax_test_syntax-page\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Syntax page</span></a>Syntax page<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#syntax_test\\" id=\\"syntax_test\\"></a></h2>/n<hr class=\\"yfm-page__delimeter\\"><h2 data-original-article=\\"page1.html\\">Page 1<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#page1\\" id=\\"page1\\"></a></h2><p><a href=\\"page2.html#hash\\">Link</a></p>/n<h4 id=\\"page1_include-link-page\\"><a href=\\"#page1_include-link-page\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Include link page</span></a>Include link page</h4>/n<p><a href=\\"../syntax/test.html\\">link</a></p>/n","headings":[],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"Skip html extension","toc":{"title":"Skip html extension","href":"index.html","items":[{"name":"Syntax","href":"syntax/test.html","id":"UUID"},{"name":"Title 1","href":"page1.html","id":"UUID"}],"path":"toc.yaml","id":"UUID"}},"router":{"pathname":"pdf-page","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}"`;
@@ -157,7 +157,6 @@ vcsPath: images.md
157
157
  6. \`[![code svg image 5](_assets/1.svg "Title"){width=100 height=200}](https://yandex.com/images/search?text=mountain)\`
158
158
  [![svg image 5](_assets/1.svg "Title"){width=100 height=200}](https://yandex.com/images/search?text=mountain)
159
159
 
160
-
161
160
  7. \`![title][code]{width=100 height=200}\`
162
161
  ![title][code]{width=100 height=200}
163
162
 
@@ -183,40 +182,52 @@ Term
183
182
  ![img](_assets/1.svg)
184
183
  and more text
185
184
 
185
+ 12. \`![code svg image 12](_assets/1.svg){inline=false}\`
186
+ ![svg image 12](_assets/1.svg){inline=false}
187
+
188
+ 13. \`![code svg image 13](_assets/1.svg){width=100 inline=false}\`
189
+ ![svg image 13](_assets/1.svg){width=100 inline=false}
190
+
191
+ 14. \`![code svg image 14](_assets/1.svg){inline=true width=100 }\`
192
+ ![svg image 14](_assets/1.svg){inline=true width=100 }
193
+
194
+ 15. \`![code svg image 15][code]{inline=true}\`
195
+ ![svg image 15][code]{inline=true}
196
+
186
197
  20. Сodeblocks - no inline svg
187
198
  \`\`\`
188
199
  Codeblock fence
189
- ![code svg image 10.1](_assets/1.svg)
200
+ ![code svg image 20.1](_assets/1.svg)
190
201
  \`\`\`
191
202
 
192
203
  \`\`\`\`
193
204
  Codeblock in codeblock
194
205
  \`\`\`
195
- ![code svg image 10.2](_assets/1.svg)
206
+ ![code svg image 20.2](_assets/1.svg)
196
207
  \`\`\`
197
- ![code svg image 10.2](_assets/1.svg)
208
+ ![code svg image 20.2](_assets/1.svg)
198
209
  \`\`\`\`
199
210
 
200
211
  ~~~
201
212
  Codeblock tilda
202
- ![code svg image 10.3](_assets/1.svg)
213
+ ![code svg image 20.3](_assets/1.svg)
203
214
  ~~~
204
215
 
205
216
  \`\`\`\`\`\`\`md translate=no
206
217
  Codeblock 10 fence
207
- ![code svg image 10.4](_assets/1.svg)
218
+ ![code svg image 20.4](_assets/1.svg)
208
219
  \`\`\`\`\`\`\`
209
220
 
210
221
  Codeblock 4 spaces
211
- ![code svg image 10.5](_assets/1.svg)
222
+ ![code svg image 20.5](_assets/1.svg)
212
223
  row 3
213
224
 
214
225
  1. Codeblock 4 spaces in list
215
226
 
216
- ![code svg image 10.6](_assets/1.svg)
227
+ ![code svg image 20.6](_assets/1.svg)
217
228
  1. Codeblock fence in list with bad gap
218
229
  \`\`\`
219
- ![code svg image 10.7](_assets/1.svg)
230
+ ![code svg image 20.7](_assets/1.svg)
220
231
  \`\`\`
221
232
 
222
233
  \`\`\`md
@@ -629,7 +640,6 @@ vcsPath: images.md
629
640
  6. \`[![code svg image 5](_assets/1.svg "Title"){width=100 height=200}](https://yandex.com/images/search?text=mountain)\`
630
641
  [![svg image 5](_assets/1.svg "Title"){width=100 height=200}](https://yandex.com/images/search?text=mountain)
631
642
 
632
-
633
643
  7. \`![title][code]{width=100 height=200}\`
634
644
  ![title][code]{width=100 height=200}
635
645
 
@@ -655,40 +665,52 @@ Term
655
665
  ![img](_assets/1.svg)
656
666
  and more text
657
667
 
668
+ 12. \`![code svg image 12](_assets/1.svg){inline=false}\`
669
+ ![svg image 12](_assets/1.svg){inline=false}
670
+
671
+ 13. \`![code svg image 13](_assets/1.svg){width=100 inline=false}\`
672
+ ![svg image 13](_assets/1.svg){width=100 inline=false}
673
+
674
+ 14. \`![code svg image 14](_assets/1.svg){inline=true width=100 }\`
675
+ ![svg image 14](_assets/1.svg){inline=true width=100 }
676
+
677
+ 15. \`![code svg image 15][code]{inline=true}\`
678
+ ![svg image 15][code]{inline=true}
679
+
658
680
  20. Сodeblocks - no inline svg
659
681
  \`\`\`
660
682
  Codeblock fence
661
- ![code svg image 10.1](_assets/1.svg)
683
+ ![code svg image 20.1](_assets/1.svg)
662
684
  \`\`\`
663
685
 
664
686
  \`\`\`\`
665
687
  Codeblock in codeblock
666
688
  \`\`\`
667
- ![code svg image 10.2](_assets/1.svg)
689
+ ![code svg image 20.2](_assets/1.svg)
668
690
  \`\`\`
669
- ![code svg image 10.2](_assets/1.svg)
691
+ ![code svg image 20.2](_assets/1.svg)
670
692
  \`\`\`\`
671
693
 
672
694
  ~~~
673
695
  Codeblock tilda
674
- ![code svg image 10.3](_assets/1.svg)
696
+ ![code svg image 20.3](_assets/1.svg)
675
697
  ~~~
676
698
 
677
699
  \`\`\`\`\`\`\`md translate=no
678
700
  Codeblock 10 fence
679
- ![code svg image 10.4](_assets/1.svg)
701
+ ![code svg image 20.4](_assets/1.svg)
680
702
  \`\`\`\`\`\`\`
681
703
 
682
704
  Codeblock 4 spaces
683
- ![code svg image 10.5](_assets/1.svg)
705
+ ![code svg image 20.5](_assets/1.svg)
684
706
  row 3
685
707
 
686
708
  1. Codeblock 4 spaces in list
687
709
 
688
- ![code svg image 10.6](_assets/1.svg)
710
+ ![code svg image 20.6](_assets/1.svg)
689
711
  1. Codeblock fence in list with bad gap
690
712
  \`\`\`
691
- ![code svg image 10.7](_assets/1.svg)
713
+ ![code svg image 20.7](_assets/1.svg)
692
714
  \`\`\`
693
715
 
694
716
  \`\`\`md
@@ -1101,7 +1123,6 @@ vcsPath: images.md
1101
1123
  6. \`[<svg width="20px" height="20px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" id="rnd-hash__search" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="rnd-hash__search_1_"><linearGradient gradientUnits="userSpaceOnUse" id="rnd-hash__SVGID_1_" x1="57.9473" x2="407.9511" y1="351.4531" y2="149.3783"><stop offset="0" stop-color="#F14D5C"/><stop offset="0.1309" stop-color="#F05454"/><stop offset="0.3346" stop-color="#3bf488"/><stop offset="0.3492" stop-color="#ED683C"/><stop offset="0.714" stop-color="#1e15a3"/><stop offset="1" stop-color="#FDC70C"/></linearGradient><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(#rnd-hash__SVGID_1_)"/><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"/><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"/></g></svg>](https://yandex.com/images/search?text=mountain)\`
1102
1124
  [<svg width="20px" height="20px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" id="rnd-hash__search" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="rnd-hash__search_1_"><linearGradient gradientUnits="userSpaceOnUse" id="rnd-hash__SVGID_1_" x1="57.9473" x2="407.9511" y1="351.4531" y2="149.3783"><stop offset="0" stop-color="#F14D5C"/><stop offset="0.1309" stop-color="#F05454"/><stop offset="0.3346" stop-color="#3bf488"/><stop offset="0.3492" stop-color="#ED683C"/><stop offset="0.714" stop-color="#1e15a3"/><stop offset="1" stop-color="#FDC70C"/></linearGradient><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(#rnd-hash__SVGID_1_)"/><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"/><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"/></g></svg>](https://yandex.com/images/search?text=mountain)
1103
1125
 
1104
-
1105
1126
  7. \`<svg width="20px" height="20px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" id="rnd-hash__search" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="rnd-hash__search_1_"><linearGradient gradientUnits="userSpaceOnUse" id="rnd-hash__SVGID_1_" x1="57.9473" x2="407.9511" y1="351.4531" y2="149.3783"><stop offset="0" stop-color="#F14D5C"/><stop offset="0.1309" stop-color="#F05454"/><stop offset="0.3346" stop-color="#3bf488"/><stop offset="0.3492" stop-color="#ED683C"/><stop offset="0.714" stop-color="#1e15a3"/><stop offset="1" stop-color="#FDC70C"/></linearGradient><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(#rnd-hash__SVGID_1_)"/><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"/><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"/></g></svg>\`
1106
1127
  <svg width="20px" height="20px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" id="rnd-hash__search" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="rnd-hash__search_1_"><linearGradient gradientUnits="userSpaceOnUse" id="rnd-hash__SVGID_1_" x1="57.9473" x2="407.9511" y1="351.4531" y2="149.3783"><stop offset="0" stop-color="#F14D5C"/><stop offset="0.1309" stop-color="#F05454"/><stop offset="0.3346" stop-color="#3bf488"/><stop offset="0.3492" stop-color="#ED683C"/><stop offset="0.714" stop-color="#1e15a3"/><stop offset="1" stop-color="#FDC70C"/></linearGradient><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(#rnd-hash__SVGID_1_)"/><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"/><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"/></g></svg>
1107
1128
 
@@ -1127,6 +1148,18 @@ Term
1127
1148
  <svg width="20px" height="20px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" id="rnd-hash__search" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="rnd-hash__search_1_"><linearGradient gradientUnits="userSpaceOnUse" id="rnd-hash__SVGID_1_" x1="57.9473" x2="407.9511" y1="351.4531" y2="149.3783"><stop offset="0" stop-color="#F14D5C"/><stop offset="0.1309" stop-color="#F05454"/><stop offset="0.3346" stop-color="#3bf488"/><stop offset="0.3492" stop-color="#ED683C"/><stop offset="0.714" stop-color="#1e15a3"/><stop offset="1" stop-color="#FDC70C"/></linearGradient><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(#rnd-hash__SVGID_1_)"/><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"/><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"/></g></svg>
1128
1149
  and more text
1129
1150
 
1151
+ 12. \`![code svg image 12](_assets/1.svg){inline=false}\`
1152
+ ![svg image 12](_assets/1.svg){inline=false}
1153
+
1154
+ 13. \`![code svg image 13](_assets/1.svg){width=100 inline=false}\`
1155
+ ![svg image 13](_assets/1.svg){width=100 inline=false}
1156
+
1157
+ 14. \`<svg width="20px" height="20px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" id="rnd-hash__search" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="rnd-hash__search_1_"><linearGradient gradientUnits="userSpaceOnUse" id="rnd-hash__SVGID_1_" x1="57.9473" x2="407.9511" y1="351.4531" y2="149.3783"><stop offset="0" stop-color="#F14D5C"/><stop offset="0.1309" stop-color="#F05454"/><stop offset="0.3346" stop-color="#3bf488"/><stop offset="0.3492" stop-color="#ED683C"/><stop offset="0.714" stop-color="#1e15a3"/><stop offset="1" stop-color="#FDC70C"/></linearGradient><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(#rnd-hash__SVGID_1_)"/><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"/><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"/></g></svg>\`
1158
+ <svg width="20px" height="20px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" id="rnd-hash__search" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="rnd-hash__search_1_"><linearGradient gradientUnits="userSpaceOnUse" id="rnd-hash__SVGID_1_" x1="57.9473" x2="407.9511" y1="351.4531" y2="149.3783"><stop offset="0" stop-color="#F14D5C"/><stop offset="0.1309" stop-color="#F05454"/><stop offset="0.3346" stop-color="#3bf488"/><stop offset="0.3492" stop-color="#ED683C"/><stop offset="0.714" stop-color="#1e15a3"/><stop offset="1" stop-color="#FDC70C"/></linearGradient><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(#rnd-hash__SVGID_1_)"/><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"/><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"/></g></svg>
1159
+
1160
+ 15. \`<svg width="20px" height="20px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" id="rnd-hash__search" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="rnd-hash__search_1_"><linearGradient gradientUnits="userSpaceOnUse" id="rnd-hash__SVGID_1_" x1="57.9473" x2="407.9511" y1="351.4531" y2="149.3783"><stop offset="0" stop-color="#F14D5C"/><stop offset="0.1309" stop-color="#F05454"/><stop offset="0.3346" stop-color="#3bf488"/><stop offset="0.3492" stop-color="#ED683C"/><stop offset="0.714" stop-color="#1e15a3"/><stop offset="1" stop-color="#FDC70C"/></linearGradient><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(#rnd-hash__SVGID_1_)"/><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"/><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"/></g></svg>\`
1161
+ <svg width="20px" height="20px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" id="rnd-hash__search" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="rnd-hash__search_1_"><linearGradient gradientUnits="userSpaceOnUse" id="rnd-hash__SVGID_1_" x1="57.9473" x2="407.9511" y1="351.4531" y2="149.3783"><stop offset="0" stop-color="#F14D5C"/><stop offset="0.1309" stop-color="#F05454"/><stop offset="0.3346" stop-color="#3bf488"/><stop offset="0.3492" stop-color="#ED683C"/><stop offset="0.714" stop-color="#1e15a3"/><stop offset="1" stop-color="#FDC70C"/></linearGradient><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(#rnd-hash__SVGID_1_)"/><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"/><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"/></g></svg>
1162
+
1130
1163
  20. Сodeblocks - no inline svg
1131
1164
  \`\`\`
1132
1165
  Codeblock fence
@@ -1,6 +1,6 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
- exports[`Skip html extension > transforms links correctly > filelist 1`] = `
3
+ exports[`Skip html extension > correctly trims .html and index.html on monolingual docs > filelist 1`] = `
4
4
  "[
5
5
  ".yfm",
6
6
  "folder/index.html",
@@ -12,12 +12,12 @@ exports[`Skip html extension > transforms links correctly > filelist 1`] = `
12
12
  ]"
13
13
  `;
14
14
 
15
- exports[`Skip html extension > transforms links correctly 1`] = `
15
+ exports[`Skip html extension > correctly trims .html and index.html on monolingual docs 1`] = `
16
16
  "allowHTML: true
17
17
  "
18
18
  `;
19
19
 
20
- exports[`Skip html extension > transforms links correctly 2`] = `
20
+ exports[`Skip html extension > correctly trims .html and index.html on monolingual docs 2`] = `
21
21
  "<!DOCTYPE html>
22
22
  <html lang="ru" dir="ltr">
23
23
  <head>
@@ -45,7 +45,7 @@ exports[`Skip html extension > transforms links correctly 2`] = `
45
45
  </html>"
46
46
  `;
47
47
 
48
- exports[`Skip html extension > transforms links correctly 3`] = `
48
+ exports[`Skip html extension > correctly trims .html and index.html on monolingual docs 3`] = `
49
49
  "<!DOCTYPE html>
50
50
  <html lang="ru" dir="ltr">
51
51
  <head>
@@ -73,27 +73,35 @@ exports[`Skip html extension > transforms links correctly 3`] = `
73
73
  </html>"
74
74
  `;
75
75
 
76
- exports[`Skip html extension > transforms links correctly 4`] = `
76
+ exports[`Skip html extension > correctly trims .html and index.html on monolingual docs 4`] = `
77
77
  "<!DOCTYPE html>
78
78
  <html lang="ru" dir="ltr">
79
79
  <head>
80
80
  <meta charset="utf-8">
81
81
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
82
82
  <base href="./" />
83
- <title>Redirect to ./ru</title>
84
- <meta http-equiv="refresh" content="0; url=./ru">
83
+ <title>Header | Skip html extension</title>
84
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
85
85
  <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
86
- <script type="application/javascript">
87
- window.location.replace("./ru");
88
- </script>
89
86
  </head>
90
87
  <body class="g-root g-root_theme_light">
91
- If you are not redirected automatically, follow this <a href="./ru">link</a>.
88
+ <div id="root"></div>
89
+ <script type="application/json" id="diplodoc-state">
90
+ {"data":{"leading":false,"html":"&lt;p&gt;Content&lt;/p&gt;/n&lt;p&gt;&lt;a href=\\"page1\\"&gt;Link 1&lt;/a&gt;&lt;br /&gt;/n&lt;a href=\\"page2\\"&gt;Link 2&lt;/a&gt;&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"vcsPath":"index.md"},"headings":[],"title":"Header"},"router":{"pathname":"index","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
91
+ </script>
92
+ <script type="application/javascript">
93
+ const data = document.querySelector('script#diplodoc-state');
94
+ window.__DATA__ = JSON.parse((function unescape(string) {
95
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
96
+ })(data.innerText));
97
+ window.STATIC_CONTENT = false;
98
+ </script>
99
+ <script type="application/javascript" defer src="toc.js"></script>
92
100
  </body>
93
101
  </html>"
94
102
  `;
95
103
 
96
- exports[`Skip html extension > transforms links correctly 5`] = `
104
+ exports[`Skip html extension > correctly trims .html and index.html on monolingual docs 5`] = `
97
105
  "<!DOCTYPE html>
98
106
  <html lang="ru" dir="ltr">
99
107
  <head>
@@ -121,7 +129,7 @@ exports[`Skip html extension > transforms links correctly 5`] = `
121
129
  </html>"
122
130
  `;
123
131
 
124
- exports[`Skip html extension > transforms links correctly 6`] = `
132
+ exports[`Skip html extension > correctly trims .html and index.html on monolingual docs 6`] = `
125
133
  "<!DOCTYPE html>
126
134
  <html lang="ru" dir="ltr">
127
135
  <head>
@@ -149,4 +157,363 @@ exports[`Skip html extension > transforms links correctly 6`] = `
149
157
  </html>"
150
158
  `;
151
159
 
152
- exports[`Skip html extension > transforms links correctly 7`] = `"window.__DATA__.data.toc = {"title":"Skip html extension","href":".","items":[{"name":"Title 1","href":"page1","id":"UUID"},{"name":"Title 2","href":"page2","id":"UUID"},{"name":"Title 3","href":"folder/","id":"UUID"},{"name":"Title 4","href":"index-test-html/","id":"UUID"}],"path":"toc.yaml","id":"UUID"};"`;
160
+ exports[`Skip html extension > correctly trims .html and index.html on monolingual docs 7`] = `"window.__DATA__.data.toc = {"title":"Skip html extension","href":".","items":[{"name":"Title 1","href":"page1","id":"UUID"},{"name":"Title 2","href":"page2","id":"UUID"},{"name":"Title 3","href":"folder/","id":"UUID"},{"name":"Title 4","href":"index-test-html/","id":"UUID"}],"path":"toc.yaml","id":"UUID"};"`;
161
+
162
+ exports[`Skip html extension > correctly trims .html and index.html on multilingual docs > filelist 1`] = `
163
+ "[
164
+ ".yfm",
165
+ "en/folder/index.html",
166
+ "en/index-test-html/index.html",
167
+ "en/index.html",
168
+ "en/page1.html",
169
+ "en/page2.html",
170
+ "en/toc.js",
171
+ "index.html",
172
+ "ru/folder/index.html",
173
+ "ru/index-test-html/index.html",
174
+ "ru/index.html",
175
+ "ru/page1.html",
176
+ "ru/page2.html",
177
+ "ru/toc.js"
178
+ ]"
179
+ `;
180
+
181
+ exports[`Skip html extension > correctly trims .html and index.html on multilingual docs 1`] = `
182
+ "allowHTML: true
183
+ langs: ['en','ru']
184
+ "
185
+ `;
186
+
187
+ exports[`Skip html extension > correctly trims .html and index.html on multilingual docs 2`] = `
188
+ "<!DOCTYPE html>
189
+ <html lang="en" dir="ltr">
190
+ <head>
191
+ <meta charset="utf-8">
192
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
193
+ <base href="../../" />
194
+ <title>Page 3 | Skip html extension</title>
195
+ <link rel="canonical" href="en/folder/">
196
+ <link rel="alternate" href="en/folder/" hreflang="en" />
197
+ <link rel="alternate" href="ru/folder/" hreflang="ru" />
198
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
199
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
200
+ </head>
201
+ <body class="g-root g-root_theme_light">
202
+ <div id="root"></div>
203
+ <script type="application/json" id="diplodoc-state">
204
+ {"data":{"leading":false,"html":"","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"alternate":[{"href":"en/folder/","hreflang":"en"},{"href":"ru/folder/","hreflang":"ru"}],"canonical":"en/folder/","vcsPath":"en/folder/index.md"},"headings":[],"title":"Page 3"},"router":{"pathname":"en/folder/index","depth":3,"base":"../../"},"lang":"en","langs":["en","ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
205
+ </script>
206
+ <script type="application/javascript">
207
+ const data = document.querySelector('script#diplodoc-state');
208
+ window.__DATA__ = JSON.parse((function unescape(string) {
209
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
210
+ })(data.innerText));
211
+ window.STATIC_CONTENT = false;
212
+ </script>
213
+ <script type="application/javascript" defer src="en/toc.js"></script>
214
+ </body>
215
+ </html>"
216
+ `;
217
+
218
+ exports[`Skip html extension > correctly trims .html and index.html on multilingual docs 3`] = `
219
+ "<!DOCTYPE html>
220
+ <html lang="en" dir="ltr">
221
+ <head>
222
+ <meta charset="utf-8">
223
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
224
+ <base href="../../" />
225
+ <title>Folder | Skip html extension</title>
226
+ <link rel="canonical" href="en/index-test-html/">
227
+ <link rel="alternate" href="en/index-test-html/" hreflang="en" />
228
+ <link rel="alternate" href="ru/index-test-html/" hreflang="ru" />
229
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
230
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
231
+ </head>
232
+ <body class="g-root g-root_theme_light">
233
+ <div id="root"></div>
234
+ <script type="application/json" id="diplodoc-state">
235
+ {"data":{"leading":false,"html":"&lt;p&gt;&lt;a href=\\"en/page1\\"&gt;Link 1&lt;/a&gt;&lt;br /&gt;/n&lt;a href=\\"en/page2\\"&gt;Link 2&lt;/a&gt;&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"alternate":[{"href":"en/index-test-html/","hreflang":"en"},{"href":"ru/index-test-html/","hreflang":"ru"}],"canonical":"en/index-test-html/","vcsPath":"en/index-test-html/index.md"},"headings":[],"title":"Folder"},"router":{"pathname":"en/index-test-html/index","depth":3,"base":"../../"},"lang":"en","langs":["en","ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
236
+ </script>
237
+ <script type="application/javascript">
238
+ const data = document.querySelector('script#diplodoc-state');
239
+ window.__DATA__ = JSON.parse((function unescape(string) {
240
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
241
+ })(data.innerText));
242
+ window.STATIC_CONTENT = false;
243
+ </script>
244
+ <script type="application/javascript" defer src="en/toc.js"></script>
245
+ </body>
246
+ </html>"
247
+ `;
248
+
249
+ exports[`Skip html extension > correctly trims .html and index.html on multilingual docs 4`] = `
250
+ "<!DOCTYPE html>
251
+ <html lang="en" dir="ltr">
252
+ <head>
253
+ <meta charset="utf-8">
254
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
255
+ <base href="../" />
256
+ <title>Header | Skip html extension</title>
257
+ <link rel="canonical" href="en/">
258
+ <link rel="alternate" href="en/" hreflang="en" />
259
+ <link rel="alternate" href="ru/" hreflang="ru" />
260
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
261
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
262
+ </head>
263
+ <body class="g-root g-root_theme_light">
264
+ <div id="root"></div>
265
+ <script type="application/json" id="diplodoc-state">
266
+ {"data":{"leading":false,"html":"&lt;p&gt;Content&lt;/p&gt;/n&lt;p&gt;&lt;a href=\\"en/page1\\"&gt;Link 1&lt;/a&gt;&lt;br /&gt;/n&lt;a href=\\"en/page2\\"&gt;Link 2&lt;/a&gt;&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"alternate":[{"href":"en/","hreflang":"en"},{"href":"ru/","hreflang":"ru"}],"canonical":"en/","vcsPath":"en/index.md"},"headings":[],"title":"Header"},"router":{"pathname":"en/index","depth":2,"base":"../"},"lang":"en","langs":["en","ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
267
+ </script>
268
+ <script type="application/javascript">
269
+ const data = document.querySelector('script#diplodoc-state');
270
+ window.__DATA__ = JSON.parse((function unescape(string) {
271
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
272
+ })(data.innerText));
273
+ window.STATIC_CONTENT = false;
274
+ </script>
275
+ <script type="application/javascript" defer src="en/toc.js"></script>
276
+ </body>
277
+ </html>"
278
+ `;
279
+
280
+ exports[`Skip html extension > correctly trims .html and index.html on multilingual docs 5`] = `
281
+ "<!DOCTYPE html>
282
+ <html lang="en" dir="ltr">
283
+ <head>
284
+ <meta charset="utf-8">
285
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
286
+ <base href="../" />
287
+ <title>Page 1 | Skip html extension</title>
288
+ <link rel="canonical" href="en/page1">
289
+ <link rel="alternate" href="en/page1" hreflang="en" />
290
+ <link rel="alternate" href="ru/page1" hreflang="ru" />
291
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
292
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
293
+ </head>
294
+ <body class="g-root g-root_theme_light">
295
+ <div id="root"></div>
296
+ <script type="application/json" id="diplodoc-state">
297
+ {"data":{"leading":false,"html":"&lt;p&gt;&lt;a href=\\"en/page2#hash\\"&gt;Link&lt;/a&gt;&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"alternate":[{"href":"en/page1","hreflang":"en"},{"href":"ru/page1","hreflang":"ru"}],"canonical":"en/page1","vcsPath":"en/page1.md"},"headings":[],"title":"Page 1"},"router":{"pathname":"en/page1","depth":2,"base":"../"},"lang":"en","langs":["en","ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
298
+ </script>
299
+ <script type="application/javascript">
300
+ const data = document.querySelector('script#diplodoc-state');
301
+ window.__DATA__ = JSON.parse((function unescape(string) {
302
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
303
+ })(data.innerText));
304
+ window.STATIC_CONTENT = false;
305
+ </script>
306
+ <script type="application/javascript" defer src="en/toc.js"></script>
307
+ </body>
308
+ </html>"
309
+ `;
310
+
311
+ exports[`Skip html extension > correctly trims .html and index.html on multilingual docs 6`] = `
312
+ "<!DOCTYPE html>
313
+ <html lang="en" dir="ltr">
314
+ <head>
315
+ <meta charset="utf-8">
316
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
317
+ <base href="../" />
318
+ <title>Page 2 | Skip html extension</title>
319
+ <link rel="canonical" href="en/page2">
320
+ <link rel="alternate" href="en/page2" hreflang="en" />
321
+ <link rel="alternate" href="ru/page2" hreflang="ru" />
322
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
323
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
324
+ </head>
325
+ <body class="g-root g-root_theme_light">
326
+ <div id="root"></div>
327
+ <script type="application/json" id="diplodoc-state">
328
+ {"data":{"leading":false,"html":"&lt;h2 id=\\"hash\\"&gt;&lt;a href=\\"en/page2#hash\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"&gt;&lt;span class=\\"visually-hidden\\" data-no-index=\\"true\\"&gt;hash&lt;/span&gt;&lt;/a&gt;hash&lt;/h2&gt;/n&lt;p&gt;&lt;a href=\\"en/folder/\\"&gt;Link&lt;/a&gt;&lt;br /&gt;/n&lt;a href=\\"https://example.com\\" target=\\"_blank\\" rel=\\"noreferrer noopener\\"&gt;External link&lt;/a&gt;&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"alternate":[{"href":"en/page2","hreflang":"en"},{"href":"ru/page2","hreflang":"ru"}],"canonical":"en/page2","vcsPath":"en/page2.md"},"headings":[{"title":"hash","href":"en/page2#hash","level":2}],"title":"Page 2"},"router":{"pathname":"en/page2","depth":2,"base":"../"},"lang":"en","langs":["en","ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
329
+ </script>
330
+ <script type="application/javascript">
331
+ const data = document.querySelector('script#diplodoc-state');
332
+ window.__DATA__ = JSON.parse((function unescape(string) {
333
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
334
+ })(data.innerText));
335
+ window.STATIC_CONTENT = false;
336
+ </script>
337
+ <script type="application/javascript" defer src="en/toc.js"></script>
338
+ </body>
339
+ </html>"
340
+ `;
341
+
342
+ exports[`Skip html extension > correctly trims .html and index.html on multilingual docs 7`] = `"window.__DATA__.data.toc = {"title":"Skip html extension","href":"en/","items":[{"name":"Title 1","href":"en/page1","id":"UUID"},{"name":"Title 2","href":"en/page2","id":"UUID"},{"name":"Title 3","href":"en/folder/","id":"UUID"},{"name":"Title 4","href":"en/index-test-html/","id":"UUID"}],"path":"en/toc.yaml","id":"UUID"};"`;
343
+
344
+ exports[`Skip html extension > correctly trims .html and index.html on multilingual docs 8`] = `
345
+ "<!DOCTYPE html>
346
+ <html lang="en" dir="ltr">
347
+ <head>
348
+ <meta charset="utf-8">
349
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
350
+ <base href="./" />
351
+ <title>Redirect to ./en</title>
352
+ <meta http-equiv="refresh" content="0; url=./en">
353
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
354
+ <script type="application/javascript">
355
+ window.location.replace("./en");
356
+ </script>
357
+ </head>
358
+ <body class="g-root g-root_theme_light">
359
+ If you are not redirected automatically, follow this <a href="./en">link</a>.
360
+ </body>
361
+ </html>"
362
+ `;
363
+
364
+ exports[`Skip html extension > correctly trims .html and index.html on multilingual docs 9`] = `
365
+ "<!DOCTYPE html>
366
+ <html lang="ru" dir="ltr">
367
+ <head>
368
+ <meta charset="utf-8">
369
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
370
+ <base href="../../" />
371
+ <title>Страница 3 | Пропустить расширение HTMLы</title>
372
+ <link rel="canonical" href="ru/folder/">
373
+ <link rel="alternate" href="en/folder/" hreflang="en" />
374
+ <link rel="alternate" href="ru/folder/" hreflang="ru" />
375
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
376
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
377
+ </head>
378
+ <body class="g-root g-root_theme_light">
379
+ <div id="root"></div>
380
+ <script type="application/json" id="diplodoc-state">
381
+ {"data":{"leading":false,"html":"","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"alternate":[{"href":"en/folder/","hreflang":"en"},{"href":"ru/folder/","hreflang":"ru"}],"canonical":"ru/folder/","vcsPath":"ru/folder/index.md"},"headings":[],"title":"Страница 3"},"router":{"pathname":"ru/folder/index","depth":3,"base":"../../"},"lang":"ru","langs":["en","ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
382
+ </script>
383
+ <script type="application/javascript">
384
+ const data = document.querySelector('script#diplodoc-state');
385
+ window.__DATA__ = JSON.parse((function unescape(string) {
386
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
387
+ })(data.innerText));
388
+ window.STATIC_CONTENT = false;
389
+ </script>
390
+ <script type="application/javascript" defer src="ru/toc.js"></script>
391
+ </body>
392
+ </html>"
393
+ `;
394
+
395
+ exports[`Skip html extension > correctly trims .html and index.html on multilingual docs 10`] = `
396
+ "<!DOCTYPE html>
397
+ <html lang="ru" dir="ltr">
398
+ <head>
399
+ <meta charset="utf-8">
400
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
401
+ <base href="../../" />
402
+ <title>Папка | Пропустить расширение HTMLы</title>
403
+ <link rel="canonical" href="ru/index-test-html/">
404
+ <link rel="alternate" href="en/index-test-html/" hreflang="en" />
405
+ <link rel="alternate" href="ru/index-test-html/" hreflang="ru" />
406
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
407
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
408
+ </head>
409
+ <body class="g-root g-root_theme_light">
410
+ <div id="root"></div>
411
+ <script type="application/json" id="diplodoc-state">
412
+ {"data":{"leading":false,"html":"&lt;p&gt;&lt;a href=\\"ru/page1\\"&gt;Ссылка 1&lt;/a&gt;&lt;br /&gt;/n&lt;a href=\\"ru/page2\\"&gt;Ссылка 2&lt;/a&gt;&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"alternate":[{"href":"en/index-test-html/","hreflang":"en"},{"href":"ru/index-test-html/","hreflang":"ru"}],"canonical":"ru/index-test-html/","vcsPath":"ru/index-test-html/index.md"},"headings":[],"title":"Папка"},"router":{"pathname":"ru/index-test-html/index","depth":3,"base":"../../"},"lang":"ru","langs":["en","ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
413
+ </script>
414
+ <script type="application/javascript">
415
+ const data = document.querySelector('script#diplodoc-state');
416
+ window.__DATA__ = JSON.parse((function unescape(string) {
417
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
418
+ })(data.innerText));
419
+ window.STATIC_CONTENT = false;
420
+ </script>
421
+ <script type="application/javascript" defer src="ru/toc.js"></script>
422
+ </body>
423
+ </html>"
424
+ `;
425
+
426
+ exports[`Skip html extension > correctly trims .html and index.html on multilingual docs 11`] = `
427
+ "<!DOCTYPE html>
428
+ <html lang="ru" dir="ltr">
429
+ <head>
430
+ <meta charset="utf-8">
431
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
432
+ <base href="../" />
433
+ <title>Хэдер | Пропустить расширение HTMLы</title>
434
+ <link rel="canonical" href="ru/">
435
+ <link rel="alternate" href="en/" hreflang="en" />
436
+ <link rel="alternate" href="ru/" hreflang="ru" />
437
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
438
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
439
+ </head>
440
+ <body class="g-root g-root_theme_light">
441
+ <div id="root"></div>
442
+ <script type="application/json" id="diplodoc-state">
443
+ {"data":{"leading":false,"html":"&lt;p&gt;Контент&lt;/p&gt;/n&lt;p&gt;&lt;a href=\\"ru/page1\\"&gt;Ссылка 1&lt;/a&gt;&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"alternate":[{"href":"en/","hreflang":"en"},{"href":"ru/","hreflang":"ru"}],"canonical":"ru/","vcsPath":"ru/index.md"},"headings":[],"title":"Хэдер"},"router":{"pathname":"ru/index","depth":2,"base":"../"},"lang":"ru","langs":["en","ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
444
+ </script>
445
+ <script type="application/javascript">
446
+ const data = document.querySelector('script#diplodoc-state');
447
+ window.__DATA__ = JSON.parse((function unescape(string) {
448
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
449
+ })(data.innerText));
450
+ window.STATIC_CONTENT = false;
451
+ </script>
452
+ <script type="application/javascript" defer src="ru/toc.js"></script>
453
+ </body>
454
+ </html>"
455
+ `;
456
+
457
+ exports[`Skip html extension > correctly trims .html and index.html on multilingual docs 12`] = `
458
+ "<!DOCTYPE html>
459
+ <html lang="ru" dir="ltr">
460
+ <head>
461
+ <meta charset="utf-8">
462
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
463
+ <base href="../" />
464
+ <title>Страница 1 | Пропустить расширение HTMLы</title>
465
+ <link rel="canonical" href="ru/page1">
466
+ <link rel="alternate" href="en/page1" hreflang="en" />
467
+ <link rel="alternate" href="ru/page1" hreflang="ru" />
468
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
469
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
470
+ </head>
471
+ <body class="g-root g-root_theme_light">
472
+ <div id="root"></div>
473
+ <script type="application/json" id="diplodoc-state">
474
+ {"data":{"leading":false,"html":"&lt;p&gt;&lt;a href=\\"ru/page2#hash\\"&gt;Link&lt;/a&gt;&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"alternate":[{"href":"en/page1","hreflang":"en"},{"href":"ru/page1","hreflang":"ru"}],"canonical":"ru/page1","vcsPath":"ru/page1.md"},"headings":[],"title":"Страница 1"},"router":{"pathname":"ru/page1","depth":2,"base":"../"},"lang":"ru","langs":["en","ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
475
+ </script>
476
+ <script type="application/javascript">
477
+ const data = document.querySelector('script#diplodoc-state');
478
+ window.__DATA__ = JSON.parse((function unescape(string) {
479
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
480
+ })(data.innerText));
481
+ window.STATIC_CONTENT = false;
482
+ </script>
483
+ <script type="application/javascript" defer src="ru/toc.js"></script>
484
+ </body>
485
+ </html>"
486
+ `;
487
+
488
+ exports[`Skip html extension > correctly trims .html and index.html on multilingual docs 13`] = `
489
+ "<!DOCTYPE html>
490
+ <html lang="ru" dir="ltr">
491
+ <head>
492
+ <meta charset="utf-8">
493
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
494
+ <base href="../" />
495
+ <title>Страница 2 | Пропустить расширение HTMLы</title>
496
+ <link rel="canonical" href="ru/page2">
497
+ <link rel="alternate" href="en/page2" hreflang="en" />
498
+ <link rel="alternate" href="ru/page2" hreflang="ru" />
499
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
500
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
501
+ </head>
502
+ <body class="g-root g-root_theme_light">
503
+ <div id="root"></div>
504
+ <script type="application/json" id="diplodoc-state">
505
+ {"data":{"leading":false,"html":"&lt;h2 id=\\"hesh\\"&gt;&lt;a href=\\"ru/page2#hesh\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"&gt;&lt;span class=\\"visually-hidden\\" data-no-index=\\"true\\"&gt;хэш&lt;/span&gt;&lt;/a&gt;хэш&lt;/h2&gt;/n&lt;p&gt;&lt;a href=\\"ru/folder/\\"&gt;Ссылка&lt;/a&gt;&lt;br /&gt;/n&lt;a href=\\"https://example.com\\" target=\\"_blank\\" rel=\\"noreferrer noopener\\"&gt;Внешняя ссылка&lt;/a&gt;&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"alternate":[{"href":"en/page2","hreflang":"en"},{"href":"ru/page2","hreflang":"ru"}],"canonical":"ru/page2","vcsPath":"ru/page2.md"},"headings":[{"title":"хэш","href":"ru/page2#hesh","level":2}],"title":"Страница 2"},"router":{"pathname":"ru/page2","depth":2,"base":"../"},"lang":"ru","langs":["en","ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
506
+ </script>
507
+ <script type="application/javascript">
508
+ const data = document.querySelector('script#diplodoc-state');
509
+ window.__DATA__ = JSON.parse((function unescape(string) {
510
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
511
+ })(data.innerText));
512
+ window.STATIC_CONTENT = false;
513
+ </script>
514
+ <script type="application/javascript" defer src="ru/toc.js"></script>
515
+ </body>
516
+ </html>"
517
+ `;
518
+
519
+ exports[`Skip html extension > correctly trims .html and index.html on multilingual docs 14`] = `"window.__DATA__.data.toc = {"title":"Пропустить расширение HTMLы","href":"ru/","items":[{"name":"Заголовок 1","href":"ru/page1","id":"UUID"},{"name":"Заголовок 2","href":"ru/page2","id":"UUID"},{"name":"Заголовок 3","href":"ru/folder/","id":"UUID"},{"name":"Заголовок 4","href":"ru/index-test-html/","id":"UUID"}],"path":"ru/toc.yaml","id":"UUID"};"`;
@@ -1,10 +1,10 @@
1
- import {describe, it} from 'vitest';
1
+ import {describe, test} from 'vitest';
2
2
 
3
3
  import {TestAdapter, compareDirectories, getTestPaths} from '../fixtures';
4
4
 
5
- describe('Skip html extension', () => {
6
- it('transforms links correctly', async () => {
7
- const {inputPath, outputPath} = getTestPaths('mocks/skip-html-extension');
5
+ const generateMapTestTemplate = (testTitle: string, testRootPath: string) => {
6
+ test(testTitle, async () => {
7
+ const {inputPath, outputPath} = getTestPaths(testRootPath);
8
8
 
9
9
  await TestAdapter.testBuildPass(inputPath, outputPath, {
10
10
  md2md: false,
@@ -13,4 +13,16 @@ describe('Skip html extension', () => {
13
13
  });
14
14
  await compareDirectories(outputPath);
15
15
  });
16
+ };
17
+
18
+ describe('Skip html extension', () => {
19
+ generateMapTestTemplate(
20
+ 'correctly trims .html and index.html on multilingual docs',
21
+ 'mocks/skip-html-extension/multilingual',
22
+ );
23
+
24
+ generateMapTestTemplate(
25
+ 'correctly trims .html and index.html on monolingual docs',
26
+ 'mocks/skip-html-extension/monolingual',
27
+ );
16
28
  });
@@ -0,0 +1,3 @@
1
+ ### Include link page
2
+
3
+ [link](../syntax/test.md)
@@ -4,3 +4,4 @@ Content
4
4
 
5
5
  [Link 1](page1.md)
6
6
  [Link 2](page2.md)
7
+
@@ -1,3 +1,6 @@
1
1
  # Page 1
2
2
 
3
3
  [Link](page2.md#hash)
4
+
5
+
6
+ {% include [include](./__includes/include1.md) %}
@@ -0,0 +1 @@
1
+ #### Syntax page
@@ -2,6 +2,8 @@ title: Skip html extension
2
2
  href: index.md
3
3
 
4
4
  items:
5
+ - name: Syntax
6
+ href: ./syntax/test.md
5
7
  - name: Title 1
6
8
  href: page1.md
7
9
  - name: Title 2
@@ -27,7 +27,6 @@
27
27
  6. `[![code svg image 5](_assets/1.svg "Title"){width=100 height=200}](https://yandex.com/images/search?text=mountain)`
28
28
  [![svg image 5](_assets/1.svg "Title"){width=100 height=200}](https://yandex.com/images/search?text=mountain)
29
29
 
30
-
31
30
  7. `![title][code]{width=100 height=200}`
32
31
  ![title][code]{width=100 height=200}
33
32
 
@@ -53,40 +52,52 @@ Term
53
52
  ![img](_assets/1.svg)
54
53
  and more text
55
54
 
55
+ 12. `![code svg image 12](_assets/1.svg){inline=false}`
56
+ ![svg image 12](_assets/1.svg){inline=false}
57
+
58
+ 13. `![code svg image 13](_assets/1.svg){width=100 inline=false}`
59
+ ![svg image 13](_assets/1.svg){width=100 inline=false}
60
+
61
+ 14. `![code svg image 14](_assets/1.svg){inline=true width=100 }`
62
+ ![svg image 14](_assets/1.svg){inline=true width=100 }
63
+
64
+ 15. `![code svg image 15][code]{inline=true}`
65
+ ![svg image 15][code]{inline=true}
66
+
56
67
  20. Сodeblocks - no inline svg
57
68
  ```
58
69
  Codeblock fence
59
- ![code svg image 10.1](_assets/1.svg)
70
+ ![code svg image 20.1](_assets/1.svg)
60
71
  ```
61
72
 
62
73
  ````
63
74
  Codeblock in codeblock
64
75
  ```
65
- ![code svg image 10.2](_assets/1.svg)
76
+ ![code svg image 20.2](_assets/1.svg)
66
77
  ```
67
- ![code svg image 10.2](_assets/1.svg)
78
+ ![code svg image 20.2](_assets/1.svg)
68
79
  ````
69
80
 
70
81
  ~~~
71
82
  Codeblock tilda
72
- ![code svg image 10.3](_assets/1.svg)
83
+ ![code svg image 20.3](_assets/1.svg)
73
84
  ~~~
74
85
 
75
86
  ```````md translate=no
76
87
  Codeblock 10 fence
77
- ![code svg image 10.4](_assets/1.svg)
88
+ ![code svg image 20.4](_assets/1.svg)
78
89
  ```````
79
90
 
80
91
  Codeblock 4 spaces
81
- ![code svg image 10.5](_assets/1.svg)
92
+ ![code svg image 20.5](_assets/1.svg)
82
93
  row 3
83
94
 
84
95
  1. Codeblock 4 spaces in list
85
96
 
86
- ![code svg image 10.6](_assets/1.svg)
97
+ ![code svg image 20.6](_assets/1.svg)
87
98
  1. Codeblock fence in list with bad gap
88
99
  ```
89
- ![code svg image 10.7](_assets/1.svg)
100
+ ![code svg image 20.7](_assets/1.svg)
90
101
  ```
91
102
 
92
103
  ```md
@@ -0,0 +1,2 @@
1
+ allowHTML: true
2
+ langs: ['en','ru']
@@ -0,0 +1,4 @@
1
+ # Folder
2
+
3
+ [Link 1](../page1.md)
4
+ [Link 2](../page2.md)
@@ -0,0 +1,6 @@
1
+ # Header
2
+
3
+ Content
4
+
5
+ [Link 1](page1.md)
6
+ [Link 2](page2.md)
@@ -0,0 +1,3 @@
1
+ # Page 1
2
+
3
+ [Link](page2.md#hash)
@@ -0,0 +1,6 @@
1
+ # Page 2
2
+
3
+ ## hash
4
+
5
+ [Link](./folder/index.md)
6
+ [External link](https://example.com)
@@ -0,0 +1,13 @@
1
+ title: Skip html extension
2
+ href: index.md
3
+
4
+ items:
5
+ - name: Title 1
6
+ href: page1.md
7
+ - name: Title 2
8
+ href: page2.md
9
+ - name: Title 3
10
+ href: ./folder/index.md
11
+ - name: Title 4
12
+ href: ./index-test-html/index.md
13
+
@@ -0,0 +1 @@
1
+ # Страница 3
@@ -0,0 +1,4 @@
1
+ # Папка
2
+
3
+ [Ссылка 1](../page1.md)
4
+ [Ссылка 2](../page2.md)
@@ -0,0 +1,5 @@
1
+ # Хэдер
2
+
3
+ Контент
4
+
5
+ [Ссылка 1](page1.md)
@@ -0,0 +1,3 @@
1
+ # Страница 1
2
+
3
+ [Link](page2.md#hash)
@@ -0,0 +1,6 @@
1
+ # Страница 2
2
+
3
+ ## хэш
4
+
5
+ [Ссылка](./folder/index.md)
6
+ [Внешняя ссылка](https://example.com)
@@ -0,0 +1,12 @@
1
+ title: Пропустить расширение HTMLы
2
+ href: index.md
3
+
4
+ items:
5
+ - name: Заголовок 1
6
+ href: page1.md
7
+ - name: Заголовок 2
8
+ href: page2.md
9
+ - name: Заголовок 3
10
+ href: ./folder/index.md
11
+ - name: Заголовок 4
12
+ href: ./index-test-html/index.md
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diplodoc/cli-tests",
3
- "version": "5.12.5",
3
+ "version": "5.13.1",
4
4
  "bin": {
5
5
  "diplodoc-cli-test": "bin.mjs"
6
6
  },