Current File : /home/pacjaorg/public_html/kmm/media/vendor/codemirror/mode/http/http.min.js |
(function(t){typeof exports=="object"&&typeof module=="object"?t(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("http",function(){function o(e,r){return e.skipToEnd(),r.cur=u,"error"}function f(e,r){return e.match(/^HTTP\/\d\.\d/)?(r.cur=s,"keyword"):e.match(/^[A-Z]+/)&&/[ \t]/.test(e.peek())?(r.cur=d,"keyword"):o(e,r)}function s(e,r){var i=e.match(/^\d+/);if(!i)return o(e,r);r.cur=l;var n=Number(i[0]);return n>=100&&n<200?"positive informational":n>=200&&n<300?"positive success":n>=300&&n<400?"positive redirect":n>=400&&n<500?"negative client-error":n>=500&&n<600?"negative server-error":"error"}function l(e,r){return e.skipToEnd(),r.cur=u,null}function d(e,r){return e.eatWhile(/\S/),r.cur=p,"string-2"}function p(e,r){return e.match(/^HTTP\/\d\.\d$/)?(r.cur=u,"keyword"):o(e,r)}function u(e){return e.sol()&&!e.eat(/[ \t]/)?e.match(/^.*?:/)?"atom":(e.skipToEnd(),"error"):(e.skipToEnd(),"string")}function c(e){return e.skipToEnd(),null}return{token:function(e,r){var i=r.cur;return i!=u&&i!=c&&e.eatSpace()?null:i(e,r)},blankLine:function(e){e.cur=c},startState:function(){return{cur:f}}}}),t.defineMIME("message/http","http")});