mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Mind that this lib is not maintained through NPM yet as its sources alone don't allow to be used in CKEditor out of the box, it needs extra steps to be built/used. And as we are already struggling with the CKEditor integration, we rather make baby steps.
14 lines
913 B
JavaScript
14 lines
913 B
JavaScript
/*! `http` grammar compiled for Highlight.js 11.9.0 */
|
|
(()=>{var e=(()=>{"use strict";return e=>{const n="HTTP/([32]|1\\.[01])",a={
|
|
className:"attribute",
|
|
begin:e.regex.concat("^",/[A-Za-z][A-Za-z0-9-]*/,"(?=\\:\\s)"),starts:{
|
|
contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",
|
|
relevance:0}}]}},s=[a,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}
|
|
}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{
|
|
begin:"^(?="+n+" \\d{3})",end:/$/,contains:[{className:"meta",begin:n},{
|
|
className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,
|
|
contains:s}},{begin:"(?=^[A-Z]+ (.*?) "+n+"$)",end:/$/,contains:[{
|
|
className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{
|
|
className:"meta",begin:n},{className:"keyword",begin:"[A-Z]+"}],starts:{
|
|
end:/\b\B/,illegal:/\S/,contains:s}},e.inherit(a,{relevance:0})]}}})()
|
|
;hljs.registerLanguage("http",e)})(); |