Skip to content

Commit a3c408a

Browse files
committed
Tests for multipart highlighting
1 parent 795b892 commit a3c408a

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

tests/md2html/fixtures/basic-new.html

+24
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,30 @@
4545
</code></pre>
4646
<pre class="nohighlight" tabindex="0"><code>https://foo.com/bar{<span class="hljs-attr">?baz*</span>,<span class="hljs-attr">qux</span>}
4747
</code></pre>
48+
<pre class="nohighlight" tabindex="0"><code><span class="hljs-meta">--boundary-example</span>
49+
<span class="hljs-literal">Content-Type:<span class="hljs-attr"> application/openapi+yaml</span></span>
50+
<span class="hljs-literal">Content-Location:<span class="hljs-attr"> https://inaccessible-domain.com/api/openapi.yaml</span></span>
51+
52+
openapi: 3.2.0
53+
info:
54+
title: Example API
55+
version: 1.0
56+
externalDocs:
57+
url: docs.html
58+
59+
<span class="hljs-meta">--boundary-example</span>
60+
<span class="hljs-literal">Content-Type:<span class="hljs-attr"> text/html</span></span>
61+
<span class="hljs-literal">Content-Location:<span class="hljs-attr"> https://example.com/api/docs.html</span></span>
62+
63+
&lt;html&gt;
64+
&lt;head&gt;
65+
&lt;title&gt;API Documentation&lt;/title&gt;
66+
&lt;/head&gt;
67+
&lt;body&gt;
68+
&lt;p&gt;Awesome documentation goes here&lt;/p&gt;
69+
&lt;/body&gt;
70+
&lt;/html&gt;
71+
</code></pre>
4872
<pre class="nohighlight" tabindex="0"><code><span class="hljs-attr">event</span>: addString
4973
<span class="hljs-attr">data</span>: This data is formatted
5074
<span class="hljs-attr">data</span>: across two lines

tests/md2html/fixtures/basic-new.md

+26
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,32 @@ https://foo.com/bar?baz=qux&fred=waldo#fragment
6262
https://foo.com/bar{?baz*,qux}
6363
```
6464

65+
```multipart
66+
--boundary-example
67+
Content-Type: application/openapi+yaml
68+
Content-Location: https://inaccessible-domain.com/api/openapi.yaml
69+
70+
openapi: 3.2.0
71+
info:
72+
title: Example API
73+
version: 1.0
74+
externalDocs:
75+
url: docs.html
76+
77+
--boundary-example
78+
Content-Type: text/html
79+
Content-Location: https://example.com/api/docs.html
80+
81+
<html>
82+
<head>
83+
<title>API Documentation</title>
84+
</head>
85+
<body>
86+
<p>Awesome documentation goes here</p>
87+
</body>
88+
</html>
89+
```
90+
6591
```eventstream
6692
event: addString
6793
data: This data is formatted

0 commit comments

Comments
 (0)