Skip to content

Commit 93b9326

Browse files
committed
Fix for when the content-type header contains a carriage return
1 parent 7e6fb45 commit 93b9326

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

http-request-response.sublime-syntax

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ first_line_match: |-
1515
)
1616
)
1717
variables:
18-
content_type_sep: (?=;|$)
18+
content_type_sep: (?=;|\r?$)
1919
multipart_form_data_boundary: (?:^---+.*$)
2020
http_version: (?:\bHTTP/\d(?:\.\d)?\b)
2121
end_of_body: (?=^{{http_version}}[ ]\d{3})
22-
end_of_headers: (?:^$\n)
22+
end_of_headers: (?:^\r?$\n)
2323
media_type_suffix_prefix: (?:[\w.-]+/[\w.-]+)
2424
contexts:
2525
prototype:

syntax_test_http.http

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,23 @@ vary: Accept-Encoding
227227
<meta charset="utf-8">
228228
</head>
229229
## ^^^ meta.body text.html meta.tag.structure.any entity.name.tag.structure.any
230+
231+
HTTP/2 200
232+
content-type: image/svg+xml; charset=UTF-8
233+
234+
<svg width="400" height="400">
235+
<g class="xaxis axis" transform="translate(30,370)">
236+
<g class="tick" style="opacity: 1;" transform="translate(0,0)">
237+
<line y2="-340" x2="0" />
238+
<text dy=".71em" style="text-anchor: middle;" y="3" x="0">-20</text>
239+
</g>
240+
<g class="tick" style="opacity: 1;" transform="translate(43.589743589743584,0)">
241+
<line y2="-340" x2="0" />
242+
<text dy=".71em" style="text-anchor: middle;" y="3" x="0">-15</text>
243+
</g>
244+
<g class="tick" style="opacity: 1;" transform="translate(87.17948717948717,0)">
245+
<line y2="-340" x2="0" />
246+
## ^^^^ meta.body text.xml meta.tag entity.name.tag.localname
247+
<text dy=".71em" style="text-anchor: middle;" y="3" x="0">-10</text>
248+
</g>
249+
</svg>

0 commit comments

Comments
 (0)