mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
2a4b879c21
commit
63664e6c1c
1155 changed files with 62261 additions and 84 deletions
50
dashboard-ui/bower_components/prism/components/prism-http.js
vendored
Normal file
50
dashboard-ui/bower_components/prism/components/prism-http.js
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
Prism.languages.http = {
|
||||
'request-line': {
|
||||
pattern: /^(POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b\shttps?:\/\/\S+\sHTTP\/[0-9.]+/m,
|
||||
inside: {
|
||||
// HTTP Verb
|
||||
property: /^(POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/,
|
||||
// Path or query argument
|
||||
'attr-name': /:\w+/
|
||||
}
|
||||
},
|
||||
'response-status': {
|
||||
pattern: /^HTTP\/1.[01] [0-9]+.*/m,
|
||||
inside: {
|
||||
// Status, e.g. 200 OK
|
||||
property: {
|
||||
pattern: /(^HTTP\/1.[01] )[0-9]+.*/i,
|
||||
lookbehind: true
|
||||
}
|
||||
}
|
||||
},
|
||||
// HTTP header name
|
||||
'header-name': {
|
||||
pattern: /^[\w-]+:(?=.)/m,
|
||||
alias: 'keyword'
|
||||
}
|
||||
};
|
||||
|
||||
// Create a mapping of Content-Type headers to language definitions
|
||||
var httpLanguages = {
|
||||
'application/json': Prism.languages.javascript,
|
||||
'application/xml': Prism.languages.markup,
|
||||
'text/xml': Prism.languages.markup,
|
||||
'text/html': Prism.languages.markup
|
||||
};
|
||||
|
||||
// Insert each content type parser that has its associated language
|
||||
// currently loaded.
|
||||
for (var contentType in httpLanguages) {
|
||||
if (httpLanguages[contentType]) {
|
||||
var options = {};
|
||||
options[contentType] = {
|
||||
pattern: new RegExp('(content-type:\\s*' + contentType + '[\\w\\W]*?)(?:\\r?\\n|\\r){2}[\\w\\W]*', 'i'),
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
rest: httpLanguages[contentType]
|
||||
}
|
||||
};
|
||||
Prism.languages.insertBefore('http', 'header-name', options);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue