diff options
Diffstat (limited to 'public/prism/prism-http.min.js')
| -rw-r--r-- | public/prism/prism-http.min.js | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/public/prism/prism-http.min.js b/public/prism/prism-http.min.js index 12c5e3a..ffec655 100644 --- a/public/prism/prism-http.min.js +++ b/public/prism/prism-http.min.js @@ -67,36 +67,34 @@ }, }; var e, - n, - s, - i = t.languages, - p = { - 'application/javascript': i.javascript, - 'application/json': i.json || i.javascript, - 'application/xml': i.xml, - 'text/xml': i.xml, - 'text/html': i.html, - 'text/css': i.css, - 'text/plain': i.plain, + n = t.languages, + s = { + 'application/javascript': n.javascript, + 'application/json': n.json || n.javascript, + 'application/xml': n.xml, + 'text/xml': n.xml, + 'text/html': n.html, + 'text/css': n.css, + 'text/plain': n.plain, }, - r = { 'application/json': !0, 'application/xml': !0 }; - for (var l in p) - if (p[l]) { + i = { 'application/json': !0, 'application/xml': !0 }; + function r(t) { + var a = t.replace(/^[a-z]+\//, ''); + return '(?:' + t + '|\\w+/(?:[\\w.-]+\\+)+' + a + '(?![+\\w.-]))'; + } + for (var p in s) + if (s[p]) { e = e || {}; - var o = r[l] - ? (void 0, - (s = (n = l).replace(/^[a-z]+\//, '')), - '(?:' + n + '|\\w+/(?:[\\w.-]+\\+)+' + s + '(?![+\\w.-]))') - : l; - e[l.replace(/\//g, '-')] = { + var l = i[p] ? r(p) : p; + e[p.replace(/\//g, '-')] = { pattern: RegExp( '(content-type:\\s*' + - o + + l + '(?:(?:\r\n?|\n)[\\w-].*)*(?:\r(?:\n|(?!\n))|\n))[^ \t\\w-][^]*', 'i' ), lookbehind: !0, - inside: p[l], + inside: s[p], }; } e && t.languages.insertBefore('http', 'header', e); |
