Skip to content

Commit

Permalink
Fix handling of content-type in languages.http
Browse files Browse the repository at this point in the history
  • Loading branch information
Keigo YAMAZAKI committed Sep 8, 2023
1 parent 59e5a34 commit bfbb060
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/prism-http.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
var pattern = suffixTypes[contentType] ? getSuffixPattern(contentType) : contentType;
options[contentType.replace(/\//g, '-')] = {
pattern: RegExp(
'(' + /content-type:\s*/.source + pattern + /(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source + ')' +
'(' + /content-type:\s*/.source + pattern + /(?:;[^\r\n]*)?(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source + ')' +
// This is a little interesting:
// The HTTP format spec required 1 empty line before the body to make everything unambiguous.
// However, when writing code by hand (e.g. to display on a website) people can forget about this,
Expand Down

0 comments on commit bfbb060

Please sign in to comment.